Skip to content

gh-162214: Define TARGET_OS_OSX macro in Modules/_testcapi/mem.c - #162220

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:wundef_target_os_osx
Nov 18, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:wundef_target_os_osx

Conversation

@vstinner

@vstinner vstinner commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Fix the two compiler warnings when building Python with -Wundef:

Modules/_testcapi/mem.c:802:5: warning: 'TARGET_OS_OSX' is not
defined, evaluates to '0' [-Wundef]
  802 | #if TARGET_OS_OSX || defined(__FreeBSD__)
      |     ^~~~~~~~~~~~~
Modules/_testcapi/mem.c:1009:5: warning: 'TARGET_OS_OSX' is not
defined, evaluates to '0' [-Wundef]
 1009 | #if TARGET_OS_OSX || defined(__FreeBSD__)
      |     ^~~~~~~~~~~~~

Fix the two compiler warnings when building Python with -Wundef:

Modules/_testcapi/mem.c:802:5: warning: 'TARGET_OS_OSX' is not
defined, evaluates to '0' [-Wundef]
  802 | #if TARGET_OS_OSX || defined(__FreeBSD__)
      |     ^~~~~~~~~~~~~
Modules/_testcapi/mem.c:1009:5: warning: 'TARGET_OS_OSX' is not
defined, evaluates to '0' [-Wundef]
 1009 | #if TARGET_OS_OSX || defined(__FreeBSD__)
      |     ^~~~~~~~~~~~~
@vstinner
vstinner force-pushed the wundef_target_os_osx branch from 964ac32 to 0cb3a24 Compare November 18, 2026 16:19
@vstinner vstinner changed the title Wundef target os osx gh-162214: Define TARGET_OS_OSX macro in Modules/_testcapi/mem.c Nov 18, 2026
@vstinner
vstinner merged commit 32197d8 into python:main Nov 18, 2026
54 checks passed
@vstinner
vstinner deleted the wundef_target_os_osx branch November 18, 2026 21:14
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.

1 participant