Author ncoghlan
Recipients amaury.forgeotdarc, benjamin.peterson, daniel.urban, georg.brandl, gvanrossum, ncoghlan, pwerneck, rodsenra, terry.reedy
Date 2011-04-19.13:26:48
SpamBayes Score 3.49559e-11
Marked as misclassified No
Message-id <1303219609.04.0.959062575311.issue1294232@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2011-04-19 13:26:49ncoghlansetrecipients: + ncoghlan, gvanrossum, georg.brandl, terry.reedy, amaury.forgeotdarc, rodsenra, pwerneck, benjamin.peterson, daniel.urban
2011-04-19 13:26:49ncoghlansetmessageid: <1303219609.04.0.959062575311.issue1294232@psf.upfronthosting.co.za>
2011-04-19 13:26:48ncoghlanlinkissue1294232 messages
2011-04-19 13:26:48ncoghlancreate