I've been messing around with dynamically generating type objects from C. In particular, I made a module to generate structseq type objects. See sourceforge bug 624827 and patch 980098. I ran into a fair amount of difficulty in doing this. There doesn't appear to be a direct C API for doing this. One possible method is calling PyType_Type.tp_new() and then updating the returned type object as needed, but that seemed a little dirty. First, could someone tell me if I took the correct route for creating a type object on the heap (based on my patch). Second, shouldn't there be a more direct API for doing this? Perhaps a more generalized interface to type_new(), or maybe something completely new?? -Eric
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