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/045650.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
Sat Jun 26 17:09:49 EDT 2004
On Sat, 26 Jun 2004, [ISO-8859-1] "Martin v. L=F6wis" wrote:

> Eric Huss wrote:
> > 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??
>
> I don't understand why the patch needs to be so complicated. Why can't
> you just make a global function that returns new type objects which
> are struct seqs? IOW, why do you need the factory type? Type objects
> are callable themselves, so they act as factories.

Yes, that is a better route to take.  Let me rework it to do that.

The question is, would that live in __builtins__ or in the new module as
Fred suggests?

-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