RAII in C
RAII in C
Posted Mar 5, 2014 20:29 UTC (Wed) by mathstuf (subscriber, #69389)In reply to: RAII in C by bronson
Parent article: A longstanding GnuTLS certificate validation botch
It'd be nicer with "__cleanup__(func, ctx)" so you could hide all of the global variables from the function. Alternatively, wrap FILE* in a struct with the data you'd have in ctx.
