gh-137136: Suppress build warnings when build on Windows with --experimental-jit-interpreter (GH-137137)

This commit is contained in:
AN Long 2025-09-03 23:42:26 +09:00 committed by GitHub
parent 34ed03875a
commit 1ff2cbbac8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 22 additions and 20 deletions

View file

@ -316,7 +316,7 @@ dummy_func(void) {
assert(PyLong_CheckExact(sym_get_const(ctx, sub_st)));
long index = PyLong_AsLong(sym_get_const(ctx, sub_st));
assert(index >= 0);
int tuple_length = sym_tuple_length(tuple_st);
Py_ssize_t tuple_length = sym_tuple_length(tuple_st);
if (tuple_length == -1) {
// Unknown length
res = sym_new_not_null(ctx);
@ -1166,9 +1166,9 @@ dummy_func(void) {
op(_CALL_LEN, (callable, null, arg -- res)) {
res = sym_new_type(ctx, &PyLong_Type);
int tuple_length = sym_tuple_length(arg);
Py_ssize_t tuple_length = sym_tuple_length(arg);
if (tuple_length >= 0) {
PyObject *temp = PyLong_FromLong(tuple_length);
PyObject *temp = PyLong_FromSsize_t(tuple_length);
if (temp == NULL) {
goto error;
}
@ -1182,13 +1182,13 @@ dummy_func(void) {
}
op(_GET_LEN, (obj -- obj, len)) {
int tuple_length = sym_tuple_length(obj);
Py_ssize_t tuple_length = sym_tuple_length(obj);
if (tuple_length == -1) {
len = sym_new_type(ctx, &PyLong_Type);
}
else {
assert(tuple_length >= 0);
PyObject *temp = PyLong_FromLong(tuple_length);
PyObject *temp = PyLong_FromSsize_t(tuple_length);
if (temp == NULL) {
goto error;
}