GNOME Bugzilla – Bug 790925
Use g_auto*
Last modified: 2018-02-05 22:23:51 UTC
We should use g_auto* instead of manually freeing resources: https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#g-auto
I think geiv is commonly used on Windows - not sure if that's also with MSVC, but that's a no-go then. What I can do is prepare the macros so that you can use it, but not use it in gexiv2 itself. For the record: I think g_auto is a massive fuck-up of refusing to use a sane language.
Does anyone know whether using those macros will change ABI?
Created attachment 365923 [details] [review] Add clean-up declarations for g_autoptr
Created attachment 365924 [details] [review] Add clean-up declarations for g_autoptr
Attachment 365924 [details] pushed as 1a19954 - Add clean-up declarations for g_autoptr
\m/ (In reply to Jens Georg from comment #1) > I think geiv is commonly used on Windows - not sure if that's also with > MSVC, but that's a no-go then. > > What I can do is prepare the macros so that you can use it, but not use it > in gexiv2 itself. Yeah, libraries that need to be portable beyond GCC and Clang can't use g_auto* themselves but can define the clean-up functions for its less portable consumers. > For the record: I think g_auto is a massive fuck-up of refusing to use a > sane language. :) (In reply to Jens Georg from comment #2) > Does anyone know whether using those macros will change ABI? Just defining the clean-up functions shouldn't change ABI.