From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-2-164-g0d05ae7 Date: Wed, 09 Sep 2009 15:03:25 +0200 Message-ID: <87bplkjmn6.fsf@gnu.org> References: <87fxaxavog.fsf@gnu.org> <1252469794.24639.20.camel@localhost.localdomain> <87vdjso97y.fsf@gnu.org> <1252492723.24639.44.camel@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1252502792 4281 80.91.229.12 (9 Sep 2009 13:26:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Sep 2009 13:26:32 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Sep 09 15:26:25 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MlNBo-00024O-IQ for guile-devel@m.gmane.org; Wed, 09 Sep 2009 15:26:24 +0200 Original-Received: from localhost ([127.0.0.1]:47234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlNBo-0001cu-0j for guile-devel@m.gmane.org; Wed, 09 Sep 2009 09:26:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlMq1-0006ha-G0 for guile-devel@gnu.org; Wed, 09 Sep 2009 09:03:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlMpw-0006g5-DQ for guile-devel@gnu.org; Wed, 09 Sep 2009 09:03:52 -0400 Original-Received: from [199.232.76.173] (port=35096 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlMpv-0006fk-E6 for guile-devel@gnu.org; Wed, 09 Sep 2009 09:03:47 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:54727) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MlMpu-0005jr-K7 for guile-devel@gnu.org; Wed, 09 Sep 2009 09:03:46 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MlMps-0003AX-A7 for guile-devel@gnu.org; Wed, 09 Sep 2009 15:03:44 +0200 Original-Received: from laptop-147-210-128-170.labri.fr ([147.210.128.170]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Sep 2009 15:03:44 +0200 Original-Received: from ludo by laptop-147-210-128-170.labri.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Sep 2009 15:03:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 74 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: laptop-147-210-128-170.labri.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 Fructidor an 217 de la =?iso-8859-1?Q?R=E9volutio?= =?iso-8859-1?Q?n?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:f/DYGI3AMm/NpCJDOwy2sNHtzsM= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:9291 Archived-At: Mike Gran writes: > On Wed, 2009-09-09 at 09:42 +0200, Ludovic Courtès wrote: >> I was actually referring to the fact that 1.8 has: >> >> SCM_API int scm_getc (SCM port); >> >> whereas 1.9 has: >> >> SCM_API scm_t_wchar scm_getc (SCM port); >> >> What do you think? > > Sorry, I misunderstood. It is, as you say, incompatible. > scm_t_wchar is scm_t_int32, not int, so 16-bit int platforms > and 64-bit int platforms would notice the change. I'm fairly > sure Guile doesn't run in 16-bit int platforms, but, 64-bit > platforms would notice the change. > > I'd like to leave it scm_t_wchar == scm_t_int32. Do you think that's a > problem? I checked on {powerpc64,sparc64,mips64el,ia64}-linux-gnu: * sizeof (int) == 4 on all of them; * sizeof (long) == 4 on all of them, except on ia64 where sizeof (long) == 8. So presumably we shouldn't worry? >> >> > --- a/libguile/strings.h >> >> > +++ b/libguile/strings.h >> >> > @@ -111,7 +111,7 @@ SCM_API SCM scm_substring_shared (SCM str, SCM start, SCM end); >> >> > SCM_API SCM scm_substring_copy (SCM str, SCM start, SCM end); >> >> > SCM_API SCM scm_string_append (SCM args); >> >> > >> >> > -SCM_INTERNAL SCM scm_i_from_stringn (const char *str, size_t len, >> >> > +SCM_API SCM scm_i_from_stringn (const char *str, size_t len, >> >> > const char *encoding, >> >> > scm_t_string_failed_conversion_handler >> >> > handler); >> >> > @@ -157,7 +157,7 @@ SCM_INTERNAL const scm_t_wchar *scm_i_string_wide_chars (SCM str); >> >> > SCM_INTERNAL SCM scm_i_string_start_writing (SCM str); >> >> > SCM_INTERNAL void scm_i_string_stop_writing (void); >> >> > SCM_INTERNAL int scm_i_is_narrow_string (SCM str); >> >> > -SCM_INTERNAL scm_t_wchar scm_i_string_ref (SCM str, size_t x); >> >> > +SCM_API scm_t_wchar scm_i_string_ref (SCM str, size_t x); >> >> >> >> Were these changes intended? >> > >> > Well, one of the two of them was intended. :) >> >> Shouldn’t both of them remain internal given that they have an ‘_i_’ in >> their name? > > I seemed to need to make scm_i_from_stringn into SCM_API so that I could > use it in libguilereadline. Pragmatically, it is now functioning as > 'SCM_API scm_from_stringn'. Cool. > The gray area is if libguilereadline is philosophically 'internal' or > 'external'. If libguilereadline is philosophically 'internal' it > could keep the name scm_i_from_stringn, but, if that is just > confusing, it should probably become scm_from_stringn. It's external. It it needs something like `scm_from_stringn' then potentially other users will need it as well, so we should have a public API. Thanks, Ludo'.