Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: Smart pointers for the C programming language. Parent comment
* I implemented smalloc and sfree to respectively allocate and deallocate a memory block with prepended metadata
* I use a GNU variable attribute called cleanup to run sfree when the variable goes out of scope
* I made some macros to have some syntactic sugar on top of that
[1] - http://snaipe.me/c/c-smart-pointers/
* I implemented smalloc and sfree to respectively allocate and deallocate a memory block with prepended metadata
* I use a GNU variable attribute called cleanup to run sfree when the variable goes out of scope
* I made some macros to have some syntactic sugar on top of that
[1] - http://snaipe.me/c/c-smart-pointers/