[Patches] [Patch #101233] PyModule_AddObject() and friends

noreply@sourceforge.net noreply@sourceforge.net
Thu, 21 Sep 2000 23:17:23 -0700


Patch #101233 has been updated. 

Project: 
Category: core (C code)
Status: Open
Summary: PyModule_AddObject() and friends

Follow-Ups:

Date: 2000-Aug-19 10:17
By: marangoz

Comment:
Looks good. BDFL need to Pronounce on API issues.
What amount of changes would this imply in the distrib? Have patch?
(the names could be tuned later directly in the patch <wink>)
-------------------------------------------------------

Date: 2000-Aug-19 21:31
By: tim_one

Comment:
Assigned to Guido because, as Vlad says, he needs to Prounounce on the idea.  Guido, the point here is to provide a single implementation to replace all the repeated and inconsistent functions and macros that modules are defining today for use in their init functions.  Was discussed on Python-Dev and was well-received there.

Andrew, I dislike the name PyModule_AddConstantLong, because that Python ints *happen* to be C longs should be an implementation detail.  Since the function is actually adding a Python int, I'm afraid I like PyModule_AddConstantInt better.  Oh, yuck.  Ah!  PyModule_AddConstantPyInt.
-------------------------------------------------------

Date: 2000-Aug-21 17:46
By: gvanrossum

Comment:
I like the idea fine, but don't think it's important enough to rush it into 2.0. Anyway it needs docs for api.tex.

AddConstantPyInt is a bad name becase "PyInt" suggests that the argument is a Python int object, not a C int. Suggestion: PyModule_AddIntConstant and PyModule_AddStringConstant.

I'm a bit worried by the implied DECREF in PyModule_AddObject -- this should better go into the other two, or the name should be changed, maybe to _AddNewObject.
-------------------------------------------------------

Date: 2000-Sep-15 09:41
By: gvanrossum

Comment:
Andrew, this was revived. Can you address the comments? I'm not against adding this to 2.0b2, although there are undoubtedly more important things to do.
-------------------------------------------------------

Date: 2000-Sep-21 23:17
By: fdrake

Comment:
Revised version of the patch that addess the concerns noted, adds API documentation.

Andrew, please review.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101233&group_id=5470