mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-03 04:09:20 +02:00
Add g_object_add/remove_toggle_ref() functions to get notification when a
2005-05-05 Owen Taylor <otaylor@redhat.com> * gobject.[ch] gobject.symbols: Add g_object_add/remove_toggle_ref() functions to get notification when a reference count is the last remaining reference; this enables better memory management for language bindings. (http://mail.gnome.org/archives/gtk-devel-list/2005-April/msg00095.html) 2005-05-05 Owen Taylor <otaylor@redhat.com> * glib/gdataset.[ch] glib/gdatasetprivate.h: Add g_datalist_set/unset_flags(), g_datalist_get_flags() functions to squeeze some bits into a GDataSet... this is needed for efficient implementation of toggle references in GObject. * tests/gobject/references.c tests/gobject/Makefile.am: Add a test case for weak and toggle references. * glib/gfileutils.[ch]: Rename g_file_replace() back to g_file_set_contents(). * glib/glib.symbols: Update. 2005-05-05 Owen Taylor <otaylor@redhat.com> * glib/Makefile.am glib/glib-sections.txt gobject/gobject-sections.txt: Update * gobject/tmpl/objects.sgml: Document toggle-references.
This commit is contained in:
@@ -1068,7 +1068,7 @@ write_to_temp_file (const gchar *contents,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_replace:
|
||||
* g_file_set_contents:
|
||||
* @filename: name of a file to write @contents to, in the GLib file name
|
||||
* encoding
|
||||
* @contents: string to write to the file
|
||||
@@ -1108,10 +1108,10 @@ write_to_temp_file (const gchar *contents,
|
||||
* Since: 2.8
|
||||
**/
|
||||
gboolean
|
||||
g_file_replace (const gchar *filename,
|
||||
const gchar *contents,
|
||||
gssize length,
|
||||
GError **error)
|
||||
g_file_set_contents (const gchar *filename,
|
||||
const gchar *contents,
|
||||
gssize length,
|
||||
GError **error)
|
||||
{
|
||||
gchar *tmp_filename;
|
||||
gboolean retval;
|
||||
|
Reference in New Issue
Block a user