Message265081
| Author |
ztane |
| Recipients |
eric.smith, gvanrossum, serhiy.storchaka, terry.reedy, ztane |
| Date |
2016年05月07日.17:10:24 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1462641024.43.0.202264405485.issue26906@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Could it be possible to to make the debug build absolutely abort on any usage of PyType's that are not readied, usage including instantiating them. Then, instead of changing all `static` linkages to `extern`s (as in Serhiy's first patch) one could rather make per-compilation unit initialization functions that are called from objects.c; that way it would be easier to use preprocessor to turn on and off the very existence of certain types in a compilation unit based on a preprocessor flag.
Likewise the C-API docs for PyType_Ready should perhaps say "This must be called on all type objects to finish their initialization." instead of "should" |
|