@@ -316,7 +316,7 @@ dummy_func(void) {
316316 assert (PyLong_CheckExact (sym_get_const (ctx , sub_st )));
317317 long index = PyLong_AsLong (sym_get_const (ctx , sub_st ));
318318 assert (index >= 0 );
319- int tuple_length = sym_tuple_length (tuple_st );
319+ Py_ssize_t tuple_length = sym_tuple_length (tuple_st );
320320 if (tuple_length == -1 ) {
321321 // Unknown length
322322 res = sym_new_not_null (ctx );
@@ -1166,9 +1166,9 @@ dummy_func(void) {
11661166
11671167 op (_CALL_LEN , (callable , null , arg -- res )) {
11681168 res = sym_new_type (ctx , & PyLong_Type );
1169- int tuple_length = sym_tuple_length (arg );
1169+ Py_ssize_t tuple_length = sym_tuple_length (arg );
11701170 if (tuple_length >= 0 ) {
1171- PyObject * temp = PyLong_FromLong (tuple_length );
1171+ PyObject * temp = PyLong_FromSsize_t (tuple_length );
11721172 if (temp == NULL ) {
11731173 goto error ;
11741174 }
@@ -1182,13 +1182,13 @@ dummy_func(void) {
11821182 }
11831183
11841184 op (_GET_LEN , (obj -- obj , len )) {
1185- int tuple_length = sym_tuple_length (obj );
1185+ Py_ssize_t tuple_length = sym_tuple_length (obj );
11861186 if (tuple_length == -1 ) {
11871187 len = sym_new_type (ctx , & PyLong_Type );
11881188 }
11891189 else {
11901190 assert (tuple_length >= 0 );
1191- PyObject * temp = PyLong_FromLong (tuple_length );
1191+ PyObject * temp = PyLong_FromSsize_t (tuple_length );
11921192 if (temp == NULL ) {
11931193 goto error ;
11941194 }
0 commit comments