Dinesh Premalal wrote:

Hi,
On 10/1/05, *Samisa Abeysinghe* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Sanjiva Weerawarana wrote:

    >On Fri, 2005-09-30 at 08:24 +0600, Samisa Abeysinghe wrote:
    >
    >
    >>What I would do for the time being is to use APR because I need
    to jump
    >>into serializing ASAP. We could revisit the implementation later
    and
    >>replace APR containers with whatever desired containers.
    >>
    >>
    >
    >+1 .. let's stand on the shoulders of giants :).
    >
    >
I noticed that the pull parser code in Guththila uses strndup.

I happened to use strndup in Guththila code because strndup or strdup is unable to use with UTF-16 characters. When implementing UTF-16 encoding support I defined

#define strndup(x, y) strdupUnicode(x, y) /* this defined in unicode.h file */

strdupUnicode is a function that is used for duplicating UTF-16 strings. Honestly I didn't know that strndup is GNU only function. Now I noticed it in man page..:)

Well this is a very good example of why we should use something like APR. Please do not get me wrong here - I am not trying to market APR ;-)

Samisa...


thanks,
Dinesh

    This is a
    GNU only method, and not present in Win API.
    Hence I used the strdup of APR in the stream writer.

    When doing the coding convention refactoring we got to change these in
    Guththila as well.

    Thnaks,
    Samisa...

    >Sanjiva.
    >
    >
    >
    >
    >




--
W.Dinesh Premalal
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.cse.mrt.ac.lk/~premalwd/ <http://www.cse.mrt.ac.lk/%7Epremalwd/>


Reply via email to