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-July/045846.html below:

[Python-Dev] Re: Advanced C Types

[Python-Dev] Re: Advanced C TypesPete Shinners pete at shinners.org
Fri Jul 2 17:24:26 CEST 2004
Michael Hudson wrote:
> Um.  What am I missing that makes this not totally pointless?  The
> "instance PyObject*" *is* the "base type's PyObject* data".  Cast it.

If this is the case, then terrific. I didn't think it could be since the 
PyObject must have to be a PyClassObject, and not PyMyBaseObject. I'm 
still working with it all, so I'll test this out. If this just works I 
am in good shape.

> Hmm, not sure about that.  Have you looked at xxsubtype in the Python
> source? 

No, but thanks for this tip, this is great! It is tucked into the 
Modules directory.

>>I feel wrong digging into my PyTypeObject for various tp_
>>pointers. 
> 
> Why?

Up until tp_alloc, and tp_init, there was a PyObject_MACRO or 
PyObject_Function to deal with these for me. I've never once before 
looked inside the PyTypeObject itself. It just seems strange to start 
doing it now. That's what makes me feel I am not doing something right. 
but if that is correct, I will access with confidence (like the pros).


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