RAII in C
RAII in C
Posted Mar 6, 2014 22:52 UTC (Thu) by cesarb (subscriber, #6266)In reply to: RAII in C by bronson
Parent article: A longstanding GnuTLS certificate validation botch
It might look like overengineering because I only showed one of the _cleanup_*_ definitions. The version of the systemd code I'm looking at has nine different _cleanup_*_ variants, four of them defined via the DEFINE_TRIVIAL_CLEANUP_FUNC macro. Search for _cleanup_ at http://cgit.freedesktop.org/systemd/systemd/tree/src/shar... (and pretend the rest of that file does not exist; it lives up to the tradition of a module called "util" being used as a dumping ground for assorted bits and pieces).
