This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fixed memory leaks in gdk-1.2.defs


Kevin Ryde <user42@zip.com.au>:

> Marko Rauhamaa <marko@pacujo.net> writes:
> >
> >  - gdk-1.2.defs: Indicated that gdk_font_intern and gdk_color_intern are
> >    now deprecated. (I don't think anybody used them anyway.)
> 
> I've been using them for the purpose described in the README, namely
> to get a conversion from a string just once.
> 
> I guess there's other ways to do that, but for upward compatibility
> I'd suggest keeping those routines.

Aha, didn't think of that.

I have submitted this generalization of the scheme: Whenever a
'conversion option is specified for a boxed or struct type, such an
"intern" function is generated automatically. However, I have chosen to
name the converter function ->type (for example: ->GdkFont, ->GdkColor)
for two reasons:

 - The arrow notation is more descriptive and idiomatic.

 - The "intern" suffix is actually misleading (no symbol table
   manipulation is going on).

For compatibility reasons I have retained the two "intern" functions but
still deprecate them.


Marko

-- 
Marko Rauhamaa      mailto:marko@pacujo.net     http://pacujo.net/marko/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]