|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Fix debug CFLAGS and add G_OBJECT() castsHi,
The patch below fixes: 1) The debug ORBIT_DEBUG_CFLAGS had next to no effect as they were overruled by CFLAGS. This is fixed by appending them to CFLAGS in configure.in and removing all mentioning of ORBIT_DEBUG_CFLAGS in the Makefile.am's. 2) The argument to g_object_unref() was sometimes cast with G_OBJECT() sometimes not. The patch corrects the non-casting cases. Please comment. Thanks, jules Index: src/orb/poa/Makefile.am =================================================================== --- src/orb/poa/Makefile.am (revision 2025) +++ src/orb/poa/Makefile.am (working copy) @@ -13,7 +13,6 @@ -I$(top_srcdir)/src/orb/poa \ -DORBIT2_INTERNAL_API \ $(WARN_CFLAGS) \ - $(ORBIT_DEBUG_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ $(LOCAL_LINC_CFLAGS) \ $(ORBIT_CFLAGS) Index: src/orb/dynamic/Makefile.am =================================================================== --- src/orb/dynamic/Makefile.am (revision 2025) +++ src/orb/dynamic/Makefile.am (working copy) @@ -12,7 +12,6 @@ -I$(top_builddir)/include/orbit/dynamic \ -DORBIT2_INTERNAL_API \ $(WARN_CFLAGS) \ - $(ORBIT_DEBUG_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ $(LOCAL_LINC_CFLAGS) \ $(ORBIT_CFLAGS) Index: src/orb/orb-core/Makefile.am =================================================================== --- src/orb/orb-core/Makefile.am (revision 2025) +++ src/orb/orb-core/Makefile.am (working copy) @@ -12,7 +12,6 @@ -DORBIT_TYPELIB_DIR=\""$(TYPELIB_DIR)"\" \ -DORBIT2_INTERNAL_API \ $(WARN_CFLAGS) \ - $(ORBIT_DEBUG_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ $(LOCAL_LINC_CFLAGS) \ $(ORBIT_CFLAGS) Index: src/orb/Makefile.am =================================================================== --- src/orb/Makefile.am (revision 2025) +++ src/orb/Makefile.am (working copy) @@ -10,7 +10,6 @@ -DORBIT_VERSION=\"@ORBIT_VERSION@\" \ -DORBIT2_INTERNAL_API \ $(WARN_CFLAGS) \ - $(ORBIT_DEBUG_CFLAGS) \ $(LOCAL_LINC_CFLAGS) \ $(ORBIT_CFLAGS) Index: src/orb/util/Makefile.am =================================================================== --- src/orb/util/Makefile.am (revision 2025) +++ src/orb/util/Makefile.am (working copy) @@ -6,7 +6,6 @@ -DORBIT_SYSTEM_RCFILE=\"$(sysconfdir)/orbitrc\" \ -DORBIT2_INTERNAL_API \ $(WARN_CFLAGS) \ - $(ORBIT_DEBUG_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ $(LOCAL_LINC_CFLAGS) \ $(ORBIT_CFLAGS) Index: src/orb/GIOP/Makefile.am =================================================================== --- src/orb/GIOP/Makefile.am (revision 2025) +++ src/orb/GIOP/Makefile.am (working copy) @@ -3,7 +3,6 @@ -I$(top_builddir)/include \ -DORBIT2_INTERNAL_API \ $(WARN_CFLAGS) \ - $(ORBIT_DEBUG_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ $(LOCAL_LINC_CFLAGS) \ $(ORBIT_CFLAGS) Index: linc2/test/test-linc.c =================================================================== --- linc2/test/test-linc.c (revision 2025) +++ linc2/test/test-linc.c (working copy) @@ -355,7 +355,7 @@ link_main_iteration (FALSE); - g_object_unref (server); + g_object_unref (G_OBJECT (server)); g_assert (server == NULL); test_server_cnx_type = 0; @@ -543,7 +543,7 @@ /* FIXME: this is horribly difficult to regression test properly: we fail */ g_assert (link_connection_wait_connected (client) == LINK_CONNECTED); - g_object_unref (server); + g_object_unref (G_OBJECT (server)); link_connection_unref (client); } Index: linc2/src/linc-connection.c =================================================================== --- linc2/src/linc-connection.c (revision 2025) +++ linc2/src/linc-connection.c (working copy) @@ -66,7 +66,7 @@ link_connection_unref_T_ (gpointer cnx) { g_assert (((GObject *)cnx)->ref_count > 1); - g_object_unref (cnx); + g_object_unref (G_OBJECT (cnx)); } static void @@ -75,7 +75,7 @@ gboolean tail_unref = FALSE; if (((GObject *)cnx)->ref_count > 1) - g_object_unref (cnx); + g_object_unref (G_OBJECT (cnx)); else { cnx_list = g_list_remove (cnx_list, cnx); @@ -100,7 +100,7 @@ d_printf ("Exec defered unref on %p\n", cmd->cnx); if (immediate) /* In I/O thread - with just 1 ref left */ - g_object_unref (cmd->cnx); + g_object_unref (G_OBJECT (cmd->cnx)); else { CNX_AND_LIST_LOCK (cmd->cnx); link_connection_unref_unlock (cmd->cnx); Index: linc2/src/Makefile.am =================================================================== --- linc2/src/Makefile.am (revision 2025) +++ linc2/src/Makefile.am (working copy) @@ -13,7 +13,6 @@ -I$(top_srcdir)/linc2/include \ $(LINC_CFLAGS) \ $(WARN_CFLAGS) \ - $(ORBIT_DEBUG_CFLAGS) \ -DG_DISABLE_DEPRECATED \ -D_GNU_SOURCE Index: test/test-giop.c =================================================================== --- test/test-giop.c (revision 2025) +++ test/test-giop.c (working copy) @@ -216,7 +216,7 @@ cnx = tmp; } - g_object_unref (server); + g_object_unref (G_OBJECT (server)); server_cnx = NULL; server = NULL; link_connection_unref (cnx); Index: test/Makefile.am =================================================================== --- test/Makefile.am (revision 2025) +++ test/Makefile.am (working copy) @@ -6,7 +6,6 @@ -I$(top_builddir)/include \ -DORBIT2_INTERNAL_API \ $(WARN_CFLAGS) \ - $(ORBIT_DEBUG_CFLAGS) \ $(LOCAL_LINC_CFLAGS) \ $(ORBIT_CFLAGS) Index: configure.in =================================================================== --- configure.in (revision 2025) +++ configure.in (working copy) @@ -112,7 +112,6 @@ ORBIT_DEBUG_CFLAGS="" fi fi -AC_SUBST(ORBIT_DEBUG_CFLAGS) AC_ARG_ENABLE(purify, [ --enable-purify be clean for memory debuggers], enable_purify=yes, enable_purify=no) if test z$enable_purify = zyes; then @@ -322,6 +321,7 @@ dnl --------- set additional gcc flags to catch errors --------- dnl AX_CFLAGS_GCC_OPTION(-Werror-implicit-function-declaration) +CFLAGS="$CFLAGS $ORBIT_DEBUG_CFLAGS" AC_SUBST(CFLAGS) Index: ChangeLog =================================================================== --- ChangeLog (revision 2026) +++ ChangeLog (working copy) @@ -1,5 +1,12 @@ 2007-09-24 Jules Colding <colding@...> + * ORBit2: Add G_OBJECT() casts to all cases of g_unref_object() + + * ORBit2: Removed ORBIT_DEBUG_CFLAGS from all Makefile.am's. + Instead appended the debug flags directly to CFLAGS in + configure.in. The debug flags would otherwise be masked by + CFLAGS and have next to no effect in terms of debug symbols. + * ORBit2: It is now possible to use the ORBNetID command line option to specify a specific NIC to be used by ORBit2 when creating externally visible objects. This is supported _______________________________________________ orbit-list mailing list orbit-list@... http://mail.gnome.org/mailman/listinfo/orbit-list |
| Free embeddable forum powered by Nabble | Forum Help |