From: Hans U. N. <gp...@n-...> - 2005-05-03 11:05:17
|
Lutz M=C3=BCller <lu...@us...> writes: > On Mon, 2005-05-02 at 20:33 +0200, Hans Ulrich Niedermann wrote: >> Then libexif must tell the frontend the gettext domain libexif uses, >> which IMHO isn't the frontend's business. >> const char *exif_set_message_codeset(const char *codeset) >> const char *exif_init_gettext(void) > > I don't like the static variable in exif_init_gettext at all. Is (Note for reference: "static" means "global" here.) Why don't you like it? bindtextdomain() itself affects global settings by definition. So having a global flag saying whether we initialized all that global stuff yet or not makes sense, IMHO. > "bindtextdomain" that expensive that we can't call it in every function > that returns strings? IMHO, yes. It has to search the filesystem for files. > If people would like to optimize libexif for > speed, they'd compile libexif without NLS anyways.=20 Or do things which need to be done once only once instead of dozens of times. Apart from that, some of those i18n functions are a little picky when being called multiple times in the same program. Uli |