From: Lutz <lu...@us...> - 2005-05-03 20:31:56
|
On Tue, 2005-05-03 at 13:03 +0200, Hans Ulrich Niedermann wrote: > > I don't like the static variable in exif_init_gettext at all. Is >=20 > (Note for reference: "static" means "global" here.) >=20 > Why don't you like it? They are evil in combination with threads. glibc does proper locking, so let's glibc take care of that. =20 > > "bindtextdomain" that expensive that we can't call it in every functi= on > > that returns strings? >=20 > IMHO, yes. It has to search the filesystem for files. As far as I can see in glibc/intl/bindtextdom.c, it first checks if the value changed. Anyways, everything the frontend needs to know in order to get proper translation is GETTEXT_PACKAGE and LOCALEDIR. What about creating a libexif/exif-config.h file with those variables? /*=20 * You need to call bindtextdomain & friends first=20 * with those variables if you would like to=20 * get proper translations. */=20 #define EXIF_GETTEXT_PACKAGE "libexif-12" #define EXIF_GETTEXT_LOCALEDIR "/some/path" /* Name, version... */ #define EXIF_PACKAGE_NAME "..." #define EXIF_PACKAGE_VERSION "..." Regards --=20 Lutz M=FCller <lu...@us...> |