Skip to content

Commit a909460

Browse files
aixtoolsericsnowcurrently
authored andcommitted
bpo-34569: Fix subinterpreter 32-bit ABI, pystate.c/_new_long_object() (gh-9127)
This fixes ShareableTypeTests.test_int() in Lib/test/test__xxsubinterpreters.py.
1 parent 2a39d25 commit a909460

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The experimental PEP 554 data channels now correctly pass negative PyLong
2+
objects between subinterpreters on 32-bit systems. Patch by Michael Felt.

Python/pystate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ _str_shared(PyObject *obj, _PyCrossInterpreterData *data)
14671467
static PyObject *
14681468
_new_long_object(_PyCrossInterpreterData *data)
14691469
{
1470-
return PyLong_FromLongLong((int64_t)(data->data));
1470+
return PyLong_FromLongLong((intptr_t)(data->data));
14711471
}
14721472

14731473
static int

0 commit comments

Comments
 (0)