[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SCM_STRING_CHARS is deprecated. See the manual for alternatives.
From: |
Neil Jerram |
Subject: |
Re: SCM_STRING_CHARS is deprecated. See the manual for alternatives. |
Date: |
Sat, 23 Sep 2006 11:19:11 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Bruce Korb <address@hidden> writes:
> Here's the deal: I just want access to the array of characters.
OK, for this you should use scm_to_locale_string().
> I am completely aware of
> the fact that any call to any Guile function can invalidate an
> address gotten via this mechanism. However, with a single threaded
> program and without making such a call, I know the address will
> remain valid. I want it. It saves a lot of allocate, copy & free
> bother. Thank you! Regards, bruce
But please note that the main reason for the new API is the need to
handle character encoding, in particular future Unicode support. See
the "Conversion to/from C" node in the manual for a bit more on this.
Regards,
Neil