unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* 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

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).