[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's the alternative for SCM_STRING_CHARS ?
From: |
Mike Gran |
Subject: |
Re: What's the alternative for SCM_STRING_CHARS ? |
Date: |
Wed, 23 Feb 2011 22:46:07 -0800 (PST) |
From: nalaginrut address@hidden
>>hi all!
>I found SCM_STRING_CHARS is deprecated, but I didn't find it's
>alternative from NEWS. Could anybody tell me where to find it?
The move to Unicode makes things a lot more complicated, unfortunately.
Strings before 1.9.x were 8-bit, so the way they were stored had to
be changed. Since their storage is now different, it isn't a good idea
to directly access the storage with macros like SCM_STRING_CHARS.
There are the functions scm_to_locale_string, scm_to_latin1_string,
scm_to_stringn, and scm_to_utf8_string. But, unlike SCM_STRING_CHARS,
the results of these functions need to be freed.
Respect,
-Mike