[PATCH] gnome2 remove deprecated function

2004-05-24 Thread Brian P. Skahan
g_value_set_object_take_ownership () is deprecated.  
using g_value_take_object () instead.

Index: lib/egg/eggmarshalers.c
===
RCS file: /home/cvs/cvsroot/gnucash/lib/egg/Attic/eggmarshalers.c,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 eggmarshalers.c
--- lib/egg/eggmarshalers.c	9 Aug 2003 23:03:32 -	1.1.2.2
+++ lib/egg/eggmarshalers.c	24 May 2004 16:57:11 -
@@ -389,7 +389,7 @@
   v_return = callback (data1,
data2);
 
-  g_value_set_object_take_ownership (return_value, v_return);
+  g_value_take_object (return_value, v_return);
 }
 
 /* VOID:VOID (eggmarshalers.list:10) */


signature.asc
Description: This is a digitally signed message part
___
gnucash-devel mailing list
[EMAIL PROTECTED]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [PATCH] gnome2 remove deprecated function

2004-05-24 Thread Derek Atkins
Uh, what version of Gnome/Gtk+/Glib are you using?  At this point
in time we're still focusing on Gnome-2.4 (i.e., Glib-2.2/GTK-2.2).
Changing the code to g_value_take_object() would break on our current
target platform, FC1.

Unless we decide to change to FC2 as the core platform (which is
unlikely at this late game) I don't think this patch is acceptable.

We already use plenty of other deprecated APIs (like GtkCList).

The code should compile just fine without this patch.

-derek

"Brian P. Skahan" <[EMAIL PROTECTED]> writes:

> g_value_set_object_take_ownership () is deprecated.  
> using g_value_take_object () instead.
>
>
> ___
> gnucash-devel mailing list
> [EMAIL PROTECTED]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
[EMAIL PROTECTED]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [PATCH] gnome2 remove deprecated function

2004-05-24 Thread Derek Atkins

PLEASE CC GNUCASH-DEVEL ON ALL REPLIES!

"Brian P. Skahan" <[EMAIL PROTECTED]> writes:

> It wouldn't compile on FC2 here.  (gtk+-2.4)

Why not?  The api exists on FC2, just inside an #ifndef
G_DISABLE_DEPRECATED which we shouldn't be defining in our code
(because it would break LOTS of stuff).  How does it fail for you on
FC2?

> looks like its in gtk+2.2 (so it should work with FC1, I think)
> http://developer.gnome.org/doc/API/2.2/gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-take-object
>
> but not in gtk+-2.0.
> so much for API stability.

Heh.  Well, g_value_set_object_take_ownership() exists in glib-2.2.1
but g_value_take_object() does not.  So, we should use the former.
Granted, it's a  API so I honestly don't see why we're
calling it at all.

> -Brian

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
[EMAIL PROTECTED]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [PATCH] gnome2 remove deprecated function

2004-05-24 Thread Brian P. Skahan
On Mon, 2004-05-24 at 15:03 -0400, Derek Atkins wrote:
> > It wouldn't compile on FC2 here.  (gtk+-2.4)
> 
> Why not?  The api exists on FC2, just inside an #ifndef
> G_DISABLE_DEPRECATED which we shouldn't be defining in our code
> (because it would break LOTS of stuff).  How does it fail for you on
> FC2?

implicit declaration of g_value_set_object_take_ownership

-Brian


signature.asc
Description: This is a digitally signed message part
___
gnucash-devel mailing list
[EMAIL PROTECTED]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [PATCH] gnome2 remove deprecated function

2004-05-24 Thread Derek Atkins
That's not a very useful error message.  :(

-derek

"Brian P. Skahan" <[EMAIL PROTECTED]> writes:

> implicit declaration of g_value_set_object_take_ownership
>
> -Brian
> ___
> gnucash-devel mailing list
> [EMAIL PROTECTED]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
[EMAIL PROTECTED]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [PATCH] gnome2 remove deprecated function

2004-05-24 Thread Derek Atkins
"Brian P. Skahan" <[EMAIL PROTECTED]> writes:

> On Mon, 2004-05-24 at 15:03 -0400, Derek Atkins wrote:
>> > It wouldn't compile on FC2 here.  (gtk+-2.4)
>> 
>> Why not?  The api exists on FC2, just inside an #ifndef
>> G_DISABLE_DEPRECATED which we shouldn't be defining in our code
>> (because it would break LOTS of stuff).  How does it fail for you on
>> FC2?
>
> implicit declaration of g_value_set_object_take_ownership

I just noticed a couple things:

1) lib/egg/Makefile.am DEFINES G_DISABLE_DEPRECATED, which is why you
   noticed this.   I'm trying to rebuild without the deprecated functions
   being disabled.

2) lib/egg does not build if I --enable-iso-c!  It complains (in
   egg-actions.c) about a bunch of things, like enums that end in a
   comma, or mixing void* and function pointers.  Just a note
   to other developers to be careful on the g2 branch with --enable-iso-c

If this build finishes on FC2 I'll try it again on my modified RH9
system.. If it works THERE then I'll commit this change to lib/egg.

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
[EMAIL PROTECTED]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel