4 ms·
Neat punning on C pointers with minimal increase in memory-footprint. Some people have suggested putting array sizes in structs. But that will increase the lev
by asimjalis 11y ago
Neat punning on C pointers with minimal increase in memory-footprint.
Some people have suggested putting array sizes in structs. But that will increase the level of indirection and hurt performance. Also it will require rewriting most applications.
With Cello's approach you just have to avoid pointer arithmetic. Everything should work.
- scaramanga 11y agoOnly if you pass a pointer to that struct. But you can just pass it by-val and it will act the same way as 2 arguments.