[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] subclassing rect



Marc Schefer wrote:
> I just gave it a try. Modifying the rect_new() function in rect.c
> allowed me to create subclasses of the Rect type. The only problem now
> is that the rect_getattr()/rect_setattr() functions don't seem to be
> called anymore. So the attributes you defined in them aren't working.
> My guess is that with Python 2.2 these should be defined using the
> tp_members or tp_getget fields of PyTypeObject structure.
> 
> Can I send you the code to your private email? I'm not sure if this
> mailing list is also about discussing the development of PyGame
> itself.

i'd be glad to see what you got working. this is good a place as any for 
pygame development. if it starts to get too technical we'll probably just 
drop into private mail eventually.

hmm, ok, it shouldn't be tough to get the attribute access happening 
through a different function pointer. things tend to get ugly with #ifdef's 
to support pre-2.2, but it won't be worse than anything already there.




____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org