This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Use PyModule_AddIntMacro() in Modules/gcmodule.c
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, jon
Priority: normal Keywords: patch

Created on 2009-11-21 23:56 by jon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
gc_macros-trunk.patch jon, 2009-11-21 23:56 Patch against trunk (2.7)
gc_macros-py3k.patch jon, 2009-11-21 23:57 Patch against py3k (3.2)
Messages (3)
msg95589 - (view) Author: Jon Parise (jon) Date: 2009-11-21 23:56
The attached patch uses PyModule_AddIntMacro() to register the gc
module's constants instead of using a local ADD_INT() macro.
msg95591 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-11-22 00:02
You don't account for PyModule_AddIntMacro failing.
msg95592 - (view) Author: Jon Parise (jon) Date: 2009-11-22 01:18
That's true.  I thought it worked the same as the ADD_INT() macro I
replaced, but I see that I was wrong.

Given that, perhaps the original code is best.  I don't see a lot of
value in replacing PyModule_AddIntConstant() with PyModule_AddIntMacro()
within ADD_INT().
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51622
2009-11-23 02:34:02benjamin.petersonsetstatus: open -> closed
resolution: works for me
2009-11-22 01:18:57jonsetmessages: + msg95592
2009-11-22 00:02:02benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg95591
2009-11-21 23:57:13jonsetfiles: + gc_macros-py3k.patch
2009-11-21 23:56:45joncreate