I have a GSList
from GTK/glib 2, and those only store full pointers, and I really don't want extra allocations. How do I do bit twiddling hacks to store extra data in those pointers?
I figure I can't just take a pointer and do tagged_ptr = ptr | 1
(indeed, the compiler complains very loudly when I try). I'm not sure how to do this.
This would definitely be local to a single function, however, and the GSList
(or the pointers) would not leak onto the rest of the code.