diff --git a/ChangeLog b/ChangeLog index 7eadedb28..802c9dd28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Tue Oct 15 15:07:45 2002 Manish Singh + + * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am: + add -DG_DISABLED_DEPRECATED + + * tests/gio-test.c tests/mainloop-test.c tests/string-test.c + tests/testglib.c test/tree-test.c tests/unicode-collate.c + tests/unicode-normalize.c: Deprecation cleanup + Mon Oct 14 15:51:05 2002 Owen Taylor * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7eadedb28..802c9dd28 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Tue Oct 15 15:07:45 2002 Manish Singh + + * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am: + add -DG_DISABLED_DEPRECATED + + * tests/gio-test.c tests/mainloop-test.c tests/string-test.c + tests/testglib.c test/tree-test.c tests/unicode-collate.c + tests/unicode-normalize.c: Deprecation cleanup + Mon Oct 14 15:51:05 2002 Owen Taylor * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 7eadedb28..802c9dd28 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,12 @@ +Tue Oct 15 15:07:45 2002 Manish Singh + + * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am: + add -DG_DISABLED_DEPRECATED + + * tests/gio-test.c tests/mainloop-test.c tests/string-test.c + tests/testglib.c test/tree-test.c tests/unicode-collate.c + tests/unicode-normalize.c: Deprecation cleanup + Mon Oct 14 15:51:05 2002 Owen Taylor * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7eadedb28..802c9dd28 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Tue Oct 15 15:07:45 2002 Manish Singh + + * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am: + add -DG_DISABLED_DEPRECATED + + * tests/gio-test.c tests/mainloop-test.c tests/string-test.c + tests/testglib.c test/tree-test.c tests/unicode-collate.c + tests/unicode-normalize.c: Deprecation cleanup + Mon Oct 14 15:51:05 2002 Owen Taylor * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7eadedb28..802c9dd28 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Tue Oct 15 15:07:45 2002 Manish Singh + + * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am: + add -DG_DISABLED_DEPRECATED + + * tests/gio-test.c tests/mainloop-test.c tests/string-test.c + tests/testglib.c test/tree-test.c tests/unicode-collate.c + tests/unicode-normalize.c: Deprecation cleanup + Mon Oct 14 15:51:05 2002 Owen Taylor * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7eadedb28..802c9dd28 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Tue Oct 15 15:07:45 2002 Manish Singh + + * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am: + add -DG_DISABLED_DEPRECATED + + * tests/gio-test.c tests/mainloop-test.c tests/string-test.c + tests/testglib.c test/tree-test.c tests/unicode-collate.c + tests/unicode-normalize.c: Deprecation cleanup + Mon Oct 14 15:51:05 2002 Owen Taylor * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7eadedb28..802c9dd28 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Tue Oct 15 15:07:45 2002 Manish Singh + + * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am: + add -DG_DISABLED_DEPRECATED + + * tests/gio-test.c tests/mainloop-test.c tests/string-test.c + tests/testglib.c test/tree-test.c tests/unicode-collate.c + tests/unicode-normalize.c: Deprecation cleanup + Mon Oct 14 15:51:05 2002 Owen Taylor * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am index f276d4bf8..0db06b9b1 100644 --- a/gmodule/Makefile.am +++ b/gmodule/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_srcdir)/gmodule \ - -DG_LOG_DOMAIN=\"GModule\" @GLIB_DEBUG_FLAGS@ + -DG_LOG_DOMAIN=\"GModule\" @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED EXTRA_DIST = \ makefile.mingw.in \ diff --git a/gobject/Makefile.am b/gobject/Makefile.am index f00de2e55..0bf994120 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -9,6 +9,7 @@ INCLUDES = @STRIP_BEGIN@ \ -I$(top_srcdir)/glib \ -I$(top_builddir) \ @GLIB_DEBUG_FLAGS@ \ + -DG_DISABLE_DEPRECATED \ -DGOBJECT_COMPILATION \ -DG_DISABLE_CONST_RETURNS \ @STRIP_END@ diff --git a/gthread/Makefile.am b/gthread/Makefile.am index 2a9e31ebd..54eb4ab6a 100644 --- a/gthread/Makefile.am +++ b/gthread/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_srcdir)/gthread \ -DG_LOG_DOMAIN=\"GThread\" @GTHREAD_COMPILE_IMPL_DEFINES@ \ - @GLIB_DEBUG_FLAGS@ + @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED EXTRA_DIST = \ makefile.mingw.in \ diff --git a/tests/gio-test.c b/tests/gio-test.c index a14d09c51..6bb2c95c7 100644 --- a/tests/gio-test.c +++ b/tests/gio-test.c @@ -105,7 +105,7 @@ shutdown_source (gpointer data) { nrunning--; if (nrunning == 0) - g_main_quit (main_loop); + g_main_loop_quit (main_loop); } } @@ -367,9 +367,9 @@ main (int argc, #endif } - main_loop = g_main_new (FALSE); + main_loop = g_main_loop_new (NULL, FALSE); - g_main_run (main_loop); + g_main_loop_run (main_loop); } else if (argc == 3) { diff --git a/tests/mainloop-test.c b/tests/mainloop-test.c index c8dec1e4b..869a72056 100644 --- a/tests/mainloop-test.c +++ b/tests/mainloop-test.c @@ -167,10 +167,8 @@ adder_thread (gpointer data) g_source_attach (timeout_source, context); g_source_unref (timeout_source); - g_main_run (addr_data.loop); + g_main_loop_run (addr_data.loop); - g_io_channel_close (channels[0]); - g_io_channel_close (channels[1]); g_io_channel_unref (channels[0]); g_io_channel_unref (channels[1]); @@ -204,6 +202,9 @@ io_pipe (GIOChannel **channels) channels[0] = g_io_channel_unix_new (fds[0]); channels[1] = g_io_channel_unix_new (fds[1]); + + g_io_channel_set_close_on_unref (channels[0], TRUE); + g_io_channel_set_close_on_unref (channels[1], TRUE); } void @@ -242,9 +243,6 @@ adder_response (GIOChannel *source, exit (1); } - g_io_channel_close (source); - g_io_channel_close (test_data->in); - g_io_channel_unref (source); g_io_channel_unref (test_data->in); diff --git a/tests/string-test.c b/tests/string-test.c index 555d2e169..799d086c1 100644 --- a/tests/string-test.c +++ b/tests/string-test.c @@ -107,19 +107,19 @@ main (int argc, #ifndef G_OS_WIN32 /* MSVC and mingw32 use the same run-time C library, which doesn't like the %10000.10000f format... */ - g_string_sprintf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%10000.10000f", - "this pete guy sure is a wuss, like he's the number ", - 1, - " wuss. everyone agrees.\n", - string1->str, - 10, 666, 15, 15, 666.666666666, 666.666666666); + g_string_printf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%10000.10000f", + "this pete guy sure is a wuss, like he's the number ", + 1, + " wuss. everyone agrees.\n", + string1->str, + 10, 666, 15, 15, 666.666666666, 666.666666666); #else - g_string_sprintf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%100.100f", - "this pete guy sure is a wuss, like he's the number ", - 1, - " wuss. everyone agrees.\n", - string1->str, - 10, 666, 15, 15, 666.666666666, 666.666666666); + g_string_printf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%100.100f", + "this pete guy sure is a wuss, like he's the number ", + 1, + " wuss. everyone agrees.\n", + string1->str, + 10, 666, 15, 15, 666.666666666, 666.666666666); #endif g_string_free (string1, TRUE); diff --git a/tests/testglib.c b/tests/testglib.c index 1c8de8d00..c32d91a5d 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -672,7 +672,7 @@ main (int argc, g_print ("tree nnodes: %d\n", g_tree_nnodes (tree)); g_print ("tree: "); - g_tree_traverse (tree, my_traverse, G_IN_ORDER, NULL); + g_tree_foreach (tree, my_traverse, NULL); g_print ("\n"); for (i = 0; i < 10; i++) @@ -682,7 +682,7 @@ main (int argc, g_print ("tree nnodes: %d\n", g_tree_nnodes (tree)); g_print ("tree: "); - g_tree_traverse (tree, my_traverse, G_IN_ORDER, NULL); + g_tree_foreach (tree, my_traverse, NULL); g_print ("\n"); g_print ("ok\n"); @@ -810,19 +810,19 @@ main (int argc, #ifndef G_OS_WIN32 /* MSVC, mingw32 and LCC use the same run-time C library, which doesn't like the %10000.10000f format... */ - g_string_sprintf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%10000.10000f", - "this pete guy sure is a wuss, like he's the number ", - 1, - " wuss. everyone agrees.\n", - string1->str, - 10, 666, 15, 15, 666.666666666, 666.666666666); + g_string_printf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%10000.10000f", + "this pete guy sure is a wuss, like he's the number ", + 1, + " wuss. everyone agrees.\n", + string1->str, + 10, 666, 15, 15, 666.666666666, 666.666666666); #else - g_string_sprintf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%100.100f", - "this pete guy sure is a wuss, like he's the number ", - 1, - " wuss. everyone agrees.\n", - string1->str, - 10, 666, 15, 15, 666.666666666, 666.666666666); + g_string_printf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%100.100f", + "this pete guy sure is a wuss, like he's the number ", + 1, + " wuss. everyone agrees.\n", + string1->str, + 10, 666, 15, 15, 666.666666666, 666.666666666); #endif g_print ("string2 length = %lu...\n", (gulong)string2->len); diff --git a/tests/tree-test.c b/tests/tree-test.c index 1d8897715..226ab88a4 100644 --- a/tests/tree-test.c +++ b/tests/tree-test.c @@ -103,14 +103,14 @@ main (int argc, g_tree_insert (tree, &chars[i], &chars[i]); } - g_tree_traverse (tree, my_traverse, G_IN_ORDER, NULL); + g_tree_foreach (tree, my_traverse, NULL); g_assert (g_tree_nnodes (tree) == (10 + 26 + 26)); for (i = 0; i < 10; i++) g_tree_remove (tree, &chars[i]); - g_tree_traverse (tree, my_traverse, G_IN_ORDER, NULL); + g_tree_foreach (tree, my_traverse, NULL); return 0; } diff --git a/tests/unicode-collate.c b/tests/unicode-collate.c index 7f7307701..33b055143 100644 --- a/tests/unicode-collate.c +++ b/tests/unicode-collate.c @@ -92,7 +92,7 @@ int main (int argc, char **argv) for (i = 0; i < line_array->len; i++) printf ("%s\n", g_array_index (line_array, Line, i).str); - g_io_channel_close (in); + g_io_channel_unref (in); return 0; } diff --git a/tests/unicode-normalize.c b/tests/unicode-normalize.c index 6dec6b27c..1d9bf3594 100644 --- a/tests/unicode-normalize.c +++ b/tests/unicode-normalize.c @@ -191,7 +191,7 @@ int main (int argc, char **argv) return 1; } - g_io_channel_close (in); + g_io_channel_unref (in); g_string_free (buffer, TRUE); return !success;