Paul Svensson wrote: > On Thu, 11 Oct 2001, Tim Peters wrote: > >[Paul Svensson] > >> #define gc_next gc_internals.internal_gc_next > >Yuck. > Why do you consider this abuse ? This pattern is used all over the place, > you can study it for example in the system headers for linux of glibc. > It's perfectly legitimate to not want to spread knowledge of the innards > of a struct (it should be wrapped another layer, yes) all over the place. Huh? Say I include a header that abomination in it. Now consider the following line of code: PyGC_Head *gc_next; Oops. The only reasonable alternative to Tim's approach that I can think of would be: #define GC_NEXT(op) ((AS_GC(op))->gc.gc_next) #define GC_PREV(op) ((AS_GC(op))->gc.gc_prev) #define GC_REFS(op) ((AS_GC(op))->gc.gc_refs) I don't think that's any better. Neil
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