mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #5501 from rocallahan/tcl-size
Use `Tcl_Size` instead of `int` to fix build errors
This commit is contained in:
commit
d550757b4e
|
|
@ -8,6 +8,11 @@
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#if TCL_MAJOR_VERSION < 9
|
||||||
|
typedef int YS_Tcl_Size;
|
||||||
|
#else
|
||||||
|
typedef Tcl_Size YS_Tcl_Size;
|
||||||
|
#endif
|
||||||
|
|
||||||
USING_YOSYS_NAMESPACE
|
USING_YOSYS_NAMESPACE
|
||||||
PRIVATE_NAMESPACE_BEGIN
|
PRIVATE_NAMESPACE_BEGIN
|
||||||
|
|
@ -432,7 +437,7 @@ static size_t get_node_count(Tcl_Interp* interp) {
|
||||||
std::vector<std::vector<std::string>> gather_nested_calls(Tcl_Interp* interp) {
|
std::vector<std::vector<std::string>> gather_nested_calls(Tcl_Interp* interp) {
|
||||||
|
|
||||||
Tcl_Obj* listObj = Tcl_GetVar2Ex(interp, "sdc_calls", nullptr, TCL_GLOBAL_ONLY);
|
Tcl_Obj* listObj = Tcl_GetVar2Ex(interp, "sdc_calls", nullptr, TCL_GLOBAL_ONLY);
|
||||||
int listLength;
|
YS_Tcl_Size listLength;
|
||||||
|
|
||||||
std::vector<std::vector<std::string>> sdc_calls;
|
std::vector<std::vector<std::string>> sdc_calls;
|
||||||
if (Tcl_ListObjLength(interp, listObj, &listLength) == TCL_OK) {
|
if (Tcl_ListObjLength(interp, listObj, &listLength) == TCL_OK) {
|
||||||
|
|
@ -442,7 +447,7 @@ std::vector<std::vector<std::string>> gather_nested_calls(Tcl_Interp* interp) {
|
||||||
if (Tcl_ListObjIndex(interp, listObj, i, &subListObj) != TCL_OK) {
|
if (Tcl_ListObjIndex(interp, listObj, i, &subListObj) != TCL_OK) {
|
||||||
log_error("broken list of lists\n");
|
log_error("broken list of lists\n");
|
||||||
}
|
}
|
||||||
int subListLength;
|
YS_Tcl_Size subListLength;
|
||||||
if (Tcl_ListObjLength(interp, subListObj, &subListLength) == TCL_OK) {
|
if (Tcl_ListObjLength(interp, subListObj, &subListLength) == TCL_OK) {
|
||||||
// Valid list - extract elements
|
// Valid list - extract elements
|
||||||
for (int j = 0; j < subListLength; j++) {
|
for (int j = 0; j < subListLength; j++) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue