FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-41111: Build limited C API without Py_TRACE_REFS macro. by shihai1991 · Pull Request #25180 · python/cpython · GitHub

/ cpython Public

bpo-41111: Build limited C API without Py_TRACE_REFS macro. - #25180

Merged
vstinner merged 2 commits into
python:masterfrom
shihai1991:bpo_41111_2
Apr 6, 2021
Merged

bpo-41111: Build limited C API without Py_TRACE_REFS macro.#25180
vstinner merged 2 commits into
python:masterfrom
shihai1991:bpo_41111_2

Conversation

shihai1991 commented Apr 4, 2021
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Comment thread setup.py Outdated
# Limited C API
self.add(Extension('xxlimited', ['xxlimited.c']))
self.add(Extension('xxlimited_35', ['xxlimited_35.c']))
# Build limited C API without Py_TRACE_REFS macro

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This comment is wrong. You should say that the limited C API is not compatible with the Py_TRACE_REFS macro.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Got it. Updated :)

vstinner merged commit 5787ba4 into python:master Apr 6, 2021

vstinner commented Apr 6, 2021

Copy link
Copy Markdown
Member

Thanks, I merged your fix.

Without this fix, xxlimited failed to build on the AMD64 Arch Linux TraceRefs 3.x buildbot. Example:

gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -g -Og -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include -I. -I/usr/local/include -I/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Include -I/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build -c /buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Modules/xxlimited_35.c -o build/temp.linux-x86_64-3.10-pydebug/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Modules/xxlimited_35.o
In file included from ./Include/Python.h:87,
                 from /buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Modules/xxlimited_35.c:10:
./Include/object.h:61:4: error: #error Py_LIMITED_API is incompatible with Py_TRACE_REFS
   61 | #  error Py_LIMITED_API is incompatible with Py_TRACE_REFS
      |    ^~~~~

https://buildbot.python.org/all/#/builders/484/builds/525

But it's not treated as an error: the compilation is displayed as a success. Moreover, test_xxlimited is simply skipped if xxlimited is missing.

This change should fix it.

Copy link
Copy Markdown
Member Author

Thanks Victor for your review & merge :)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL