* null terminated strings (was: argz SMOB)
2004-01-16 0:21 ` Paul Jarc
@ 2004-01-16 9:10 ` Andreas Voegele
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Voegele @ 2004-01-16 9:10 UTC (permalink / raw)
Paul Jarc writes:
> Brian S McQueen <bqueen@nas.nasa.gov> wrote:
>> Particularly, I wonder about the best way to produce a null
>> terminated C string from a scheme string.
>
> SCM_STRING_COERCE_0TERMINATION_X(scheme_string);
> char* s=SCM_STRING_CHARS(scheme_string);
Is it necessary or desirable to use the macro
SCM_STRING_COERCE_0TERMINATION_X if one uses Guile 1.6? I've found
the following statement in the file libguile/strings.c that comes with
Guile 1.6.4:
"[...] we promise that strings are null-terminated."
And in guile-readline/Changelog:
"Remove calls to SCM_STRING_COERCE_0TERMINATION_X. Since the
substring type is gone, all strings are 0-terminated anyway."
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: null terminated strings (was: argz SMOB)
@ 2004-01-16 10:09 Roland Orre
0 siblings, 0 replies; 2+ messages in thread
From: Roland Orre @ 2004-01-16 10:09 UTC (permalink / raw)
On Fri, 2004-01-16 at 10:10, Andreas Voegele wrote:
> "Remove calls to SCM_STRING_COERCE_0TERMINATION_X. Since the
> substring type is gone, all strings are 0-terminated anyway."
Such a statement is very worrying. What happened to the promises
that all substrings will be shared strings?
Roland Orre
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-16 10:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-16 10:09 null terminated strings (was: argz SMOB) Roland Orre
-- strict thread matches above, loose matches on Subject: below --
2004-01-05 17:40 argz SMOB Brian S McQueen
2004-01-06 19:54 ` Daniel Skarda
2004-01-15 18:43 ` Brian S McQueen
2004-01-16 0:21 ` Paul Jarc
2004-01-16 9:10 ` null terminated strings (was: argz SMOB) Andreas Voegele
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).