From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Voegele Newsgroups: gmane.lisp.guile.user Subject: null terminated strings (was: argz SMOB) Date: Fri, 16 Jan 2004 10:10:01 +0100 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <87oet4ntsm.fsf_-_@ID-28718.user.uni-berlin.de> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074245256 24956 80.91.224.253 (16 Jan 2004 09:27:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2004 09:27:36 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jan 16 10:27:32 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AhQGJ-0004KT-00 for ; Fri, 16 Jan 2004 10:27:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AhQ9g-0008Qb-E7 for guile-user@m.gmane.org; Fri, 16 Jan 2004 04:20:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AhQ3F-0007Gh-IR for guile-user@gnu.org; Fri, 16 Jan 2004 04:14:01 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AhQ2d-00076V-D3 for guile-user@gnu.org; Fri, 16 Jan 2004 04:13:55 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.24) id 1AhPzQ-0006gi-Jf for guile-user@gnu.org; Fri, 16 Jan 2004 04:10:04 -0500 Original-Received: (qmail 6161 invoked by uid 65534); 16 Jan 2004 09:10:02 -0000 Original-Received: from pD9519EB6.dip.t-dialin.net (EHLO kepler.voegele.dyndns.org) (217.81.158.182) by mail.gmx.net (mp006) with SMTP; 16 Jan 2004 10:10:02 +0100 X-Authenticated: #14729429 Original-Received: by kepler.voegele.dyndns.org (Postfix, from userid 1000) id CE5EB2E63D; Fri, 16 Jan 2004 10:10:01 +0100 (CET) Original-To: guile-user@gnu.org X-Request-PGP: http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0x12C21DCA X-PGP-KeyID: 12C21DCA In-Reply-To: (Paul Jarc's message of "Thu, 15 Jan 2004 19:21:50 -0500") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2605 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2605 Paul Jarc writes: > Brian S McQueen 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