From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Improved `scm_from_locale_symbol ()' + `scm_take_locale_symbol ()' Date: Tue, 24 Jan 2006 15:22:18 +0100 Organization: LAAS-CNRS Message-ID: <87d5ih7lk5.fsf@laas.fr> References: <87vexlyp9f.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1138117943 3802 80.91.229.2 (24 Jan 2006 15:52:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Jan 2006 15:52:23 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jan 24 16:52:21 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F1QSS-0008Ny-Fe for guile-devel@m.gmane.org; Tue, 24 Jan 2006 16:51:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1QV8-00057x-Bj for guile-devel@m.gmane.org; Tue, 24 Jan 2006 10:54:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F1PBA-0003qY-Nu for guile-devel@gnu.org; Tue, 24 Jan 2006 09:29:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F1P7R-0002I1-VZ for guile-devel@gnu.org; Tue, 24 Jan 2006 09:26:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1P6n-00021c-Ur for guile-devel@gnu.org; Tue, 24 Jan 2006 09:25:22 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1F1PBj-0000qc-0u for guile-devel@gnu.org; Tue, 24 Jan 2006 09:30:27 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id k0OEMUiu011233; Tue, 24 Jan 2006 15:22:32 +0100 (CET) Original-To: hanwen@xs4all.nl X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 5 =?iso-8859-1?Q?Pluvi=F4se?= an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: hanwen@xs4all.nl, guile-devel@gnu.org In-Reply-To: (Han-Wen Nienhuys's message of "Tue, 24 Jan 2006 11:11:19 +0000 (UTC)") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-MIME-Autoconverted: from 8bit to quoted-printable by laas.laas.fr id k0OEMUiu011233 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5614 Archived-At: hanwen@byrd.xs4all.nl (Han-Wen Nienhuys) writes: > In article <87vexlyp9f.fsf@laas.fr>, > Ludovic Court=E8s wrote: [...] >>This second modification has a nice effect: it can significantly reduce >>the number of objects created at load-time. Unfortunately, Guile's >>built-in reader always produces Scheme strings (in `scm_read_token ()') >>so it cannot benefit from this optimization. > > Why isn't it possible to write a > > take_symbol_from_string() > > which takes the C-string inside the SCM string, and sets the data of > the SCM string to NULL? Or am I missing wrt to shared strings?=20 I'd say because the underlying `stringbuf' cannot be shared between a symbol and a string. Theoretically, it should be doable but we'd have to generalize things like `scm_i_string_writable_chars ()' so that it works also for symbols. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel