Re: [gmime-devel] Status update on InternetAddress* changes



On Mon, 2008-08-25 at 12:37 -0400, Peter Bloomfield wrote:
> Hi Jeff:
> 
> Thanks for the heads-up about the list!

np!

> 
> you wrote:
> [ snip ]
> > At this point I'm considering removing the  
> > g_mime_message_add_recipients_from_string() API because it is very  
> > unlikely to be used very often (as the developer would need a list of  
> > recipients in encoded string form) and can now be easily implemented  
> > using the InternetAddressList APIs anyway, if a developer ever finds a  
> > need for this.
> 
> Snap response: in Balsa, g_mime_message_add_recipients_from_string  
> /always/ occurs in a internet_address_list_to_string/add_recip/g_free  
> sequence, so we can happily live without it!

Awesome, this is what I figured people were doing which is just gross :p

> 
> As for const return for objects: I've adapted to the inconsistency of Gtk,  
> so now I always (well, mostly :) ) check the documentation (which  
> sometimes is only the code :( ) to find out when I'm getting a reffed  
> object and when only a (non-const) pointer to a private object.  But  
> perhaps matching Gtk practices is setting the bar too low!

Whatever I decide, I want GMime's APIs to be consistent with itself.
Secondary would be to be consistent with GLib/Gtk (assuming that they
are (mostly?) consistent with themselves, I think this a worthy goal).

I'll have to do a bit more research, but from my /recollection/, they
normally don't return a ref'd object, so that's probably what I'll do -
however, to make everyone's lives easier so that they don't actually
have to check the code, I'll be updating the docs to be clear once I
figure out what to do :)

For example, I may say "unless otherwise specified, a function which
returns a GObject always returns a non-const pointer which has not been
ref'd" and then, if I must, document the few exceptions to the rule. I'd
like to avoid exceptions to the rule if I can, however :)

Thanks for the feedback Peter!

Jeff




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]