[Python-Dev] The docstring hack for signature information has to go
larry at hastings.org
Tue Feb 4 10:59:29 CET 2014
On 02/03/2014 02:06 PM, Gregory P. Smith wrote:
> Wouldn't your proposal to extend the PyMethodDef structure would
> require ifdef's and make it impossible to include the type information
> in something compiled against the 3.3 headers that you want to use in
> 3.4 without recompiling?
It might use #ifdefs. However, my proposal was forwards-compatible.
When iterating over the methoddef array passed in with a type, if the
PyMethodDef flags parameter had METH_SIGNATURE set, I'd advance by
sizeof(PyMethodDefEx) bytes, otherwise I'd advance by
sizeof(PyMethodDef) bytes. Modules compiled against 3.3 would not have
the flag set, therefore I'd advance by the right amount, therefore they
should be fine.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev