diff --git a/src/dialogs/tools.c b/src/dialogs/tools.c index a0db079..c174d8a 100644 --- a/src/dialogs/tools.c +++ b/src/dialogs/tools.c @@ -95,3 +95,14 @@ } + #if ! GLIB_CHECK_VERSION(2,44,0) + + // Reference: https://github.com/ImageMagick/glib/blob/master/glib/glib-autocleanups.h + void v3270_autoptr_cleanup_generic_gfree(void *p) + { + void **pp = (void**)p; + g_free (*pp); + } + + #endif // ! GLIB(2,44,0) + diff --git a/src/include/internals.h b/src/include/internals.h index f6fb949..937087c 100644 --- a/src/include/internals.h +++ b/src/include/internals.h @@ -39,12 +39,7 @@ #if ! GLIB_CHECK_VERSION(2,44,0) - // Reference: https://github.com/ImageMagick/glib/blob/master/glib/glib-autocleanups.h - static inline void v3270_autoptr_cleanup_generic_gfree(void *p) - { - void **pp = (void**)p; - g_free (*pp); - } + G_GNUC_INTERNAL void v3270_autoptr_cleanup_generic_gfree(void *p); #define g_autofree __attribute__((cleanup(v3270_autoptr_cleanup_generic_gfree))) -- libgit2 0.21.2