Re: package version macros, pango backspace_deletes_character



On Tue, 2004-02-03 at 09:27, Ross McFarland wrote:
> in working on the the gtk2-perl bindings set we've run into several situations
> where something new has been added in a version of a package which has no
> version macros. one case of this problem is PangoLayoutAttr adding the struct
> member backspace_deletes_character. it was apparently added with version 1.3.0
> (or around there,) but there doesn't seem to be anything in the pango header
> files about versions so we can't do ifdef's around access to that member. in
> other modules we've had to do things with CFLAGS and pkg-config at Makefile.PL
> time (essentially configure) to define version info on the gcc command lines
> which is way less than ideal.
> 
> i would like (and bindings would greatly benifit from) it being standard
> practice to have something like the (GLIB|GTK)_(MAJOR|MINOR|MICRO)_VERSION
> scheme be required of all modules of the gtk/gnome family.
> 
> if it's just a matter of someone doing it i could probably manage submitting a
> patch for at least pango, but whatever else people are interested in.
> 
> of course as always i could be missing something, if that's the case feel free
> to enlighten me.

Just pick a version of Pango, and write support for that. If you
*really* want to conditionalize, you can do it using pkgconfig
--modversion pango and define a variable from that.

But I think trying to support multiple versions is almost always a bad
idea.  It means that someone using version X.Y.Z of your binding 
has *NO IDEA* what Pango functions it supports ... it will completely
depend on version of Pango was installed when the Perl binding was
compiled.

Thanks,
						Owen





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