[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Implementing Metatypes in C
From:       Greg Chapman <glc () well ! com>
Date:       2003-04-15 13:34:47
[Download RAW message or body]

On Mon, 14 Apr 2003 00:10:10 +0100, Phil Thompson <phil@river-bank.demon.co.uk>
wrote:

>1. Is my understanding correct, or is there a more correct way to do what I 
>want that avoids the problem?
>
>2. If my solution is correct, can the structure defined in typeobject.c be 
>published in a header file as the comment says? Please?

I believe your solution may break in 2.3a2 if subtypes declare tp_members, since
the PyMemberDefs for these are kept in the variable part of the type structure
which follows the things declared in etype.  At any rate, check out this patch
(accepted after the release of 2.3a2):

   http://www.python.org/sf/696193

which should allow you to cleanly add extra data slots to metatypes.

---
Greg Chapman

-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic