[Geany-devel] g_file_replace_contents patch - Re: Safe file saving - permissions issue

Алексей Антипов 1a_antipov at xxxxx
Sat Sep 11 18:31:11 UTC 2010


Hello, Nick!

Here are the answers to your 2 questions:
> 1. Where is HAVE_GIO defined? Should we use a version check for GLib
> 2.16 instead?
configure.ac:141

# GIO checks
gio_modules="gio-2.0 >= 2.16"
PKG_CHECK_MODULES(GIO, [$gio_modules], have_gio=1, have_gio=0)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
if test $have_gio = 1 ; then
    AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available])
fi

Don't know if GLib can be compiled without GIO, but it seems there were reasons for checking gio-2.0, not glib-2.0

> 2. I'm assuming there's no need to free the GFile from
> g_file_new_for_path?
I haven't found any notice at http://library.gnome.org/devel/gio/stable/GFile.html, so I assume there's no need to 
do this.

It's been very long since I made this patch, so I don't remember all the details. Please feel free to modify and 
include it as you want, but let me know if (and when) it has been commited.

Regards,
Alexey




More information about the Devel mailing list