* What's the alternative for SCM_STRING_CHARS ?
@ 2011-02-24 5:17 nalaginrut
2011-02-24 9:12 ` Andy Wingo
0 siblings, 1 reply; 5+ messages in thread
From: nalaginrut @ 2011-02-24 5:17 UTC (permalink / raw)
To: guile-user
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?
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What's the alternative for SCM_STRING_CHARS ?
@ 2011-02-24 6:46 Mike Gran
2011-02-24 6:57 ` nalaginrut
2011-02-24 10:50 ` Ludovic Courtès
0 siblings, 2 replies; 5+ messages in thread
From: Mike Gran @ 2011-02-24 6:46 UTC (permalink / raw)
To: NalaGinrut@gmail.com, guile-user@gnu.org
From: nalaginrut nalaginrut@gmail.com
>>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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What's the alternative for SCM_STRING_CHARS ?
2011-02-24 6:46 Mike Gran
@ 2011-02-24 6:57 ` nalaginrut
2011-02-24 10:50 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: nalaginrut @ 2011-02-24 6:57 UTC (permalink / raw)
To: Mike Gran; +Cc: guile-user@gnu.org
> 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
Thanks! But it sounds like I got a lot code to change. :-)
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What's the alternative for SCM_STRING_CHARS ?
2011-02-24 6:46 Mike Gran
2011-02-24 6:57 ` nalaginrut
@ 2011-02-24 10:50 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2011-02-24 10:50 UTC (permalink / raw)
To: guile-user
Hello,
Mike Gran <spk121@yahoo.com> writes:
> 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.
For the record scm_{to,from}_locale_string were already the only
supported way of dealing with C strings in 1.8.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-24 10:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 5:17 What's the alternative for SCM_STRING_CHARS ? nalaginrut
2011-02-24 9:12 ` Andy Wingo
-- strict thread matches above, loose matches on Subject: below --
2011-02-24 6:46 Mike Gran
2011-02-24 6:57 ` nalaginrut
2011-02-24 10:50 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).