Message134052
Yep, the leading underscore and the fact you added it to a block of code that is skipped when Py_LIMITED_API is defined makes it OK to include the prototype in object.h.
However, I would suggest _PyType_CalculateMetaclass as the name - CalculateWinner is a bit vague without the specific context of calculating the metaclass.
On a broader point, I think there is an issue that needs to be brought up on python-dev: in light of PEP 3115, "type(name, bases, ns)" is no longer an entirely safe way to create dynamic types, as it bypasses __prepare__ methods. There should be an official way to access the full class building process, including correct invocation of __prepare__ methods (likely by making __build_class__ an official part of the language spec rather than a CPython implementation detail). |
|
Date |
User |
Action |
Args |
2011-04-19 13:26:49 | ncoghlan | set | recipients:
+ ncoghlan, gvanrossum, georg.brandl, terry.reedy, amaury.forgeotdarc, rodsenra, pwerneck, benjamin.peterson, daniel.urban |
2011-04-19 13:26:49 | ncoghlan | set | messageid: <1303219609.04.0.959062575311.issue1294232@psf.upfronthosting.co.za> |
2011-04-19 13:26:48 | ncoghlan | link | issue1294232 messages |
2011-04-19 13:26:48 | ncoghlan | create | |
|