Every time I want to do some C programming on projects which do not depend on #GLib I end up missing the g_auto* convenience. Today I got tired of the situation and ended up writing my own, single-header, MIT-licensed, cleanroom implementation, which can be just copy-pasted in any C project → https://github.com/aperezdc/autocleanup
(Of course it still requires that the compiler supports GCC's “__attribute__((cleanup(f)))”, but that's fine by me.)
In retrospective, it's a lot of fun doing cute small tools in #C now and then, specially when a good amount of my daily work is staring at tens of thousands of C++ WebKit code. Which is also amazing in its own ways, but hey, come on... It's C++ 😔
Also, note to self: I haven't been doing #pixelart lately, and not all can be just coding. Maybe tomorrow!
Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!