Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gh-90815: Fix _PyMem_MimallocEnabled() compiler warning #111522

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Oct 30, 2023

Don't declare _PyMem_MimallocEnabled() if WITH_PYMALLOC macro is not defined (./configure --without-pymalloc).

Fix also a typo in _PyInterpreterState_FinalizeAllocatedBlocks().

Don't declare _PyMem_MimallocEnabled() if WITH_PYMALLOC macro is not
defined (./configure --without-pymalloc).

Fix also a typo in _PyInterpreterState_FinalizeAllocatedBlocks().
@vstinner
Copy link
Member Author

I tested that no warnings is emitted with these 4 configurations:

pyconfigure_debug --with-pymalloc --with-mimalloc && make clean && make
pyconfigure_debug --with-pymalloc --without-mimalloc && make clean && make
pyconfigure_debug --without-pymalloc --with-mimalloc && make clean && make
pyconfigure_debug --without-pymalloc --without-mimalloc && make clean && make

with:

$ alias pyconfigure_debug
alias pyconfigure_debug='./configure --cache-file=../python-config.cache --with-pydebug CFLAGS=-O0 --with-system-expat'

@vstinner vstinner merged commit da4d314 into python:main Oct 30, 2023
@vstinner vstinner deleted the mimalloc branch October 30, 2023 22:05
FullteaR pushed a commit to FullteaR/cpython that referenced this pull request Nov 3, 2023
…#111522)

Don't declare _PyMem_MimallocEnabled() if WITH_PYMALLOC macro is not
defined (./configure --without-pymalloc).

Fix also a typo in _PyInterpreterState_FinalizeAllocatedBlocks().
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…#111522)

Don't declare _PyMem_MimallocEnabled() if WITH_PYMALLOC macro is not
defined (./configure --without-pymalloc).

Fix also a typo in _PyInterpreterState_FinalizeAllocatedBlocks().
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…#111522)

Don't declare _PyMem_MimallocEnabled() if WITH_PYMALLOC macro is not
defined (./configure --without-pymalloc).

Fix also a typo in _PyInterpreterState_FinalizeAllocatedBlocks().
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant