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/2005-November/058328.html below:

[Python-Dev] Problems with mro for dual inheritance in C [Was: Problems with the Python Memory Manager]

[Python-Dev] Problems with mro for dual inheritance in C [Was: Problems with the Python Memory Manager] [Python-Dev] Problems with mro for dual inheritance in C [Was: Problems with the Python Memory Manager]Armin Rigo arigo at tunes.org
Thu Nov 24 23:24:52 CET 2005
Hi Travis,

On Thu, Nov 24, 2005 at 10:17:43AM -0700, Travis E. Oliphant wrote:
> Why doesn't the int32 
> type inherit its tp_free from the early types first?

In your case I suspect that the tp_free is inherited from the tp_base
which is probably 'int'.  I don't see how to "fix" typeobject.c, because
I'm not sure that there is a solution that would do the right thing in
all cases at this level.

I would suggest that you just force the tp_alloc/tp_free that you want
in your static types instead.  That's what occurs for example if you
build a similar inheritance hierarchy with classes defined in Python:
these classes are then 'heap types', so they always get the generic
tp_alloc/tp_free before PyType_Ready() has a chance to see them.


Armin
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