Re: FriBidiEnv (was: Re: fribidi and shaping arabic characters)
Behdad Esfahbod <[email protected]>
| Newsgroups | gmane.comp.internationalization.fribidi |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 27 Jan 2006, Omer Zak wrote: > FriBidiEnv (as argument) was introduced to support usage of FriBidi in > operating systems, which do not support static memory (the operating > systems in question were GEOS - used in Nokia 9110 cellular phone/FAX; > and Symbian OS, used in several cellular smartphones by Nokia, > Sony-Ericsson and others). > > In operating systems, which support static memory (such as Linux), the > FriBidi library sets aside memory for one instance of FriBidiEnv, and it > is accessed when the argument is set to NULL. > > In addition, multithreaded applications need to have a separate > FriBidiEnv instance for each thread, which needs to use the FriBidi > library. Hi Omer, In the fribidi2 module, I have reimplemented this functionality by introducing a flags type FriBidiFlags, that is passed to all the functions that need configurations. There are still four static variables in the code: * fribidi.c (fribidi_debug): Only available if FriBidi is configured with debugging enabled. * fribidi-deprecated.c (flags): Only used to keep the flags for deprecated functions like fribidi_log2vis that do not take a flags parameter themselves. * fribidi-run.c (free_runs, run_mem_chunk): Used if FriBidi is not configured to use malloc for each run. So, to make a thread-safe build of FriBidi with no static memory, one can build without --disable-debug --enable-malloc, and don't build the deprecated stuff... I'm going to add an option --disable-depreacted for that. I may even make --enable-malloc the default, but that's going to slow down FriBidi a bit, and it's not really used with multi-threaded applications currently... behdad > Due to the need for support for multithreaded applications, I recommend > to explain to the Debian maintainers about this issue. > --- Omer > > On Fri, 2006-01-27 at 14:52 -0500, Behdad Esfahbod wrote: > > On Fri, 27 Jan 2006, kobi zamir wrote: > > > > > Hello, > > > > > > Fribidi ver. 0.11.0-2 (current cvs) change the log2vis function signiture. > > > it now has a new argument [ FriBidiEnv *fribidienv ] > > > > > > I see that you can call this function with *ribidienv=NULL and get the > > > same results. what is fribidienv used for ? > > > > > > This change in the api may cause linux distributions like debian not > > > to upgrade > > > there fribidi version to 0.11.0 to keep there mlterm, pango ... working. > > > > > > Any way around this ? > > > > Forget about HEAD. You should checkout the fribidi2 module. > > That's documented on the wiki at fribidi.org. Please test that > > code base. > > --behdad http://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill" -- Dan Bern, "New American Language"