[issue5630] Update CObject API so it is safe and regular

Lisandro Dalcin report at bugs.python.org
Tue Mar 31 23:49:02 CEST 2009


Lisandro Dalcin <dalcinl at gmail.com> added the comment:

Two questions:

1) Why do you prefer to pass destructor as a first argument?

2) Do we really need two different calls for providing a context
pointer? Why no just one call and pass a NULL context?

A comment:

Suppose one wants to implement export/import module C-API's in a
function-by-function basis. This is nice, as you can extend your module
C-API, and make it be backward "ABI" compatible.

As the void* <-> void(*)(void) conversion is illegal(?) in C(99?), one
has to go to the oddities of doing some sort of type-punning with
unions... this could be somewhat tedious for hand-written extension
modules. 

Do you have any idea on how extend the CObject API for the commented use
case?

----------
nosy: +dalcinl

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5630>
_______________________________________


More information about the Python-bugs-list mailing list