[Python-Dev] GC head alignment issue (original) (raw)
Tim Peters tim.one@home.com
Thu, 11 Oct 2001 20:54:29 -0400
- Previous message: [Python-Dev] GC head alignment issue
- Next message: [Python-Dev] GC head alignment issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Paul Svensson]
The usual thing to do in this situation would be:
typedef union gchead { struct { union gchead *internalgcnext; union gchead *internalgcprev; int internalgcrefs; } gcinternals; double dummy; /* force worst-case alignment */ } PyGCHead; #define gcnext gcinternals.internalgchead #define gcnext gcinternals.internalgchead #define gcrefs gcinternals.internalgcrefs
Yuck. The less we abuse the preprocessor, the brighter the future of the Python codebase, and that's a good concrete example of why.
and-that's-after-ignoring-the-redundant-redefinition-of- gc_next-ly y'rs - tim
- Previous message: [Python-Dev] GC head alignment issue
- Next message: [Python-Dev] GC head alignment issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]