Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-142038: Expand guard for types_world_is_stopped to fix debug build…
…s without assertions
  • Loading branch information
xhochy committed Nov 28, 2025
commit dadaadc2ec8fb7595069e3ed89ea2223cb9209bd
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class object "PyObject *" "&PyBaseObject_Type"

#define END_TYPE_DICT_LOCK() Py_END_CRITICAL_SECTION2()

#ifndef NDEBUG
#if !defined(NDEBUG) || defined(Py_Debug)

@picnixz picnixz Nov 28, 2025 •

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.

The name of the macro is not Py_Debug but Py_DEBUG And ideally, I think we should instead use Py_DEBUG rather than NDEBUG.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed, this should be just Py_DEBUG.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We had that before, and that caused problems for non-debug builds with --with-assertions. This issue was then addressed by #140133, which, however, introduced a new problem with debug-without-assertions builds.

// Return true if the world is currently stopped.
static bool
types_world_is_stopped(void)
Expand Down
Loading