◐ Shell
clean mode source ↗

bpo-41111: Move the Py_LIMITED_API macro of xxlimited module from setup.py to xxlimited.c. by shihai1991 · Pull Request #25115 · python/cpython

Conversation

@shihai1991 shihai1991 changed the title bpo-4111: Move the Py_LIMITED_API macro of xxlimited module from setup.py to xxlimited.c. bpo-41111: Move the Py_LIMITED_API macro of xxlimited module from setup.py to xxlimited.c.

Mar 31, 2021

vstinner

define_macros=[('WITH_Py_LIMITED_API', 1)]))
else:
# Debug mode: Build xxlimited with the full API
# (which is compatible with the limited one)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, I'm disappointed that CPython doesn't even support its own stable ABI in debug mode. So I created https://bugs.python.org/issue43688 to also support the limited C API in debug mode.


/* xxlimited with the limited API. */
#ifdef WITH_Py_LIMITED_API
# define Py_LIMITED_API 0x03100000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0x03100000 is wrong: it must be 0x030a0000 (the bug exists in the current code). I fixed the issue in my PR #25131.

@vstinner

@vstinner

I merged PR #25151 instead, I marked you as a co-author of my change ;-)

Labels