A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-June/045619.html below:

[Python-Dev] Heap allocated type objects from C

[Python-Dev] Heap allocated type objects from C [Python-Dev] Heap allocated type objects from CEric Huss ehuss at ironport.com
Fri Jun 25 21:38:25 EDT 2004
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

More information about the Python-Dev mailing list

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