From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: request reversion regarding scm_i_* removal Date: Mon, 18 Aug 2008 11:36:59 -0700 Message-ID: References: <873alc9dkl.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1219166374 7212 80.91.229.12 (19 Aug 2008 17:19:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Aug 2008 17:19:34 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 19 19:20:26 2008 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 1KVUrY-0006Fg-6o for guile-devel@m.gmane.org; Tue, 19 Aug 2008 19:19:20 +0200 Original-Received: from localhost ([127.0.0.1]:39246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVUqb-0007OD-0i for guile-devel@m.gmane.org; Tue, 19 Aug 2008 13:18:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVUqV-0007O4-Cl for guile-devel@gnu.org; Tue, 19 Aug 2008 13:18:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVUqT-0007NY-4K for guile-devel@gnu.org; Tue, 19 Aug 2008 13:18:14 -0400 Original-Received: from [199.232.76.173] (port=35621 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVUqS-0007NN-W6 for guile-devel@gnu.org; Tue, 19 Aug 2008 13:18:13 -0400 Original-Received: from a-sasl-fastnet.sasl.smtp.pobox.com ([207.106.133.19]:35322 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KVUqQ-0000tS-65; Tue, 19 Aug 2008 13:18:10 -0400 Original-Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 2D1DB533FB; Tue, 19 Aug 2008 13:16:11 -0400 (EDT) Original-Received: from unquote (c-76-105-207-11.hsd1.or.comcast.net [76.105.207.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 9B1AC533F7; Tue, 19 Aug 2008 13:16:09 -0400 (EDT) In-Reply-To: <873alc9dkl.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 11 Aug 2008 10:10:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Pobox-Relay-ID: 850DADA6-6E12-11DD-B161-B29498D589B0-02397024!a-sasl-fastnet.pobox.com X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:7472 Archived-At: Good day! Still on holiday, but the train provides a lovely hacktime. On Mon 11 Aug 2008 01:10, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Andy Wingo writes: > >> The removal of the scm_i_* functions is an ABI break in the stable 1.8 >> series. It should be reverted. (It's a great fix for master though.) > > The "i" always stood for "internal", but let's see what can be done... > ;-) Yeah, I know. Bad me. (And others, of course.) But I don't think "We told you so" is a good reason to change within a stable series -- and in this particular case I don't think its cost is worth its benefits. I do think it's a super fix for master, though! :) > I don't mind leaving `scm_i_symbol_length ()' public for the sake of ABI > compatibility, just like `scm_i_string_chars ()' and a few others. > > Eventually, application code should have a configure check, allowing it > to use either `_i_' or `_c_'. Yeah, I agree. >> but more seriously the port table, with the >> scm_i_port_table_mutex. (The port API sucks, I know.) > > What do you mean? What code outside `libguile' uses > `scm_i_port_table_mutex'? Guile-gnome does, when registering a new port type, for gnome-vfs. The port API isn't threadsafe, and also sucks as I mentioned ;) From gnome-vfs/gnome/gw/gnome-vfs-port.c: #define LOCK scm_i_pthread_mutex_lock (&scm_i_port_table_mutex) #define UNLOCK scm_i_pthread_mutex_unlock (&scm_i_port_table_mutex) SCM=20 scm_gnome_vfs_handle_to_port (GnomeVFSHandle *handle, GnomeVFSOpenMode = mode, const gchar* uri) #define FUNC_NAME "scm_gnome_vfs_handle_to_port" { long mode_bits =3D vfs_mode_bits (mode); SCM port; scm_t_port *pt; LOCK; port =3D scm_new_port_table_entry (scm_tc16_vport); SCM_SET_CELL_TYPE(port, scm_tc16_vport | mode_bits); pt =3D SCM_PTAB_ENTRY(port); pt->rw_random =3D mode & GNOME_VFS_OPEN_RANDOM; SCM_SETSTREAM (port, handle); if (mode_bits & SCM_BUF0) scm_vport_buffer_add (port, 0, 0); else scm_vport_buffer_add (port, -1, -1); SCM_SET_FILENAME (port, scm_makfrom0str (uri)); UNLOCK; return port; } #undef FUNC_NAME Also there's the bit in the flush() vfunc about scm_i_terminating. Nastiness all around. Regards, Andy --=20 http://wingolog.org/