Antoine Pitrou <solipsis <at> pitrou.net> writes: > > In any case, you seem to be right on this particular point: the PyGC_Head > union > should probably contain a "double" alternative in addition to the "long > double" > (and perhaps even a "long long" one).
Sorry, I realize that this doesn't really address the point. In addition to that union, we should also have a particular mechanism to compute what the proper offset should be between the PyGC_Head and the PyObject. Probably something like: typedef struct { PyGC_Head head; union { /* ... similar union as in PyGC_head */ } body; } _PyGC_dummy; #define _PyGC_Head_OFFSET offsetof(_PyGC_dummy, body) #define _Py_AS_GC(o) ((PyGC_Head *) ((void *)(o) - _PyGC_Head_OFFSET)) Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com