Mark Dickinson wrote:
This doesn't sound right. The functions in the third party code will get
compiled with the wrong signature, so they can crash (or behave unexpectedly)
when called by Python.
Yes, of course the signature of the getters and setters changes.  Please
ignore me. :-)

If they don't use the closure field, then either they won't compile due to type mismatches or they'll work fine. There's a lot of code in CPython that didn't need to be changed for my remove-closure patch; the functions didn't bother taking the "void * closure" that they were going to ignore anyway, and then they cast the function pointer in the PyGetSetDef to make the compiler shut up. Worked fine. And, in nearly all cases, the static PyGetSetDefs omit the closure member, which means C initializes them with a 0.


/larry/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to