Re: i18n of Amaya, typing, memory leaks, etc.

In-reply-to: Your message of Sun, 09 Jan 2000 19:35:13 -0500."
             <20000110003120.5358.qmail@my-deja.com> 

Hi,

>1. thotlib/unicode/uconvert.c : 
>
>Just how is one supposed to know whether the value returned by ISO2WideChar()
>has been dynamically allocated by TtaAllocString() --- and should therefore
>be deallocated after use, since Amaya doesn't seem to include a garbage
>collector --- or simply cast from the input argument (in which case it is
>out of the question to deallocate it)?
>
>I've seen code that uses the result of ISO2WideChar() as part of a larger
>expression, without capturing it in a named variable; this will have to
>change if ISO2WideChar() is determined to return dynamically allocated memory.
>
>A proper, well-designed interface specification is needed for these string
>conversion routines.
>
>Another problem I see is the lack of a counted-string version of ISO2WideChar(),
>one that would take the number of characters to be converted as an additional
>argument instead of relying on a final '\0'.

You're right, ISO2WideChar and WideChar2ISO are here to allow to
transform 
only an ISO latin string from 8-bit encoding to 16-bit encoding and are
not
useful for other kind of character encoding.

There is no garbage collector working dynamically with amaya. We have to
free
explicitly every resource allocated.

I'm now working mainly on the internationalization of Amaya and I can
tell you
that these two functions will disappear because we will use other
functions
that transform characters from multibyte to wide character encoding.
This will
be valid for any kind of character encoding and every resource allocated
will
be released as soon as it becomes unused.

-- 
Ramzi GUETARI                          |  Tel: (33) 4 76 61 52 38
World Wide Web Consortium / INRIA      |  Fax: (33) 4 76 61 52 52
655 Avenue de l'Europe                 |  e-mail: Ramzi.Guetari@w3.org
38330 Montbonnot Saint Martin - France |  http://www.w3.org

          http://www.inrialpes.fr/opera/people/Ramzi.Guetari

Received on Wednesday, 12 January 2000 05:21:12 UTC