Petr Viktorin schrieb am 17.04.2015 um 15:52: > As a background, the PyModuleDef structure [1] is currently: > > struct PyModuleDef{ > PyModuleDef_Base m_base; > const char* m_name; > const char* m_doc; > Py_ssize_t m_size; > PyMethodDef *m_methods; > inquiry m_reload; > traverseproc m_traverse; > inquiry m_clear; > freefunc m_free; > }; > > ... where the m_reload pointer is unused, and must be NULL. > My proposal is to repurpose this pointer to hold an array of slots, in the > style of PEP 384's PyType_Spec [2], which would allow adding extensions -- > both those needed for PEP 489 and future ones. FWIW, I'm +1 on this. It replaces a struct field that risks staying unused basically forever with an extensible interface that massively improves the current extension module protocol and allows future extensions (including getting back the pointer we replaced). The alternative of essentially duplicating all sorts of things to accommodate for a new metadata struct is way too cumbersome and ugly in comparison. Stefan
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4