Michael Hudson <mwh at python.net> writes: > It seems to me that it would be more sensible to have a dict mapping > names (maybe just module names...) to cobjects in the interpreter > state. I guess there might be a way of getting ahold of the dict with > the gc module (though I can't think of one off hand). This wouldn't > be a difficult change, and if the CObjects are left in the module > dicts, it shouldn't even do that much damage to binary compatibility. > > Thoughts? Good idea. Alternatively, we could make "APIs" a feature of modules: PyModule_GetAPI, PyModule_SetAPI. We would then define typedef struct { PyObject_HEAD PyObject *md_dict; PyObject *md_api; } PyModuleObject; We could restrict md_api to CObjects, which, means we would not need to change module_traverse. Regards, Martin
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