From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: request reversion regarding scm_i_* removal
Date: Mon, 18 Aug 2008 11:36:59 -0700 [thread overview]
Message-ID: <m3iqtyw4ok.fsf@pobox.com> (raw)
In-Reply-To: <873alc9dkl.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 11 Aug 2008 10:10:50 +0200")
Good day!
Still on holiday, but the train provides a lovely hacktime.
On Mon 11 Aug 2008 01:10, ludo@gnu.org (Ludovic Courtès) writes:
> Andy Wingo <wingo@pobox.com> 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
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 = vfs_mode_bits (mode);
SCM port;
scm_t_port *pt;
LOCK;
port = scm_new_port_table_entry (scm_tc16_vport);
SCM_SET_CELL_TYPE(port, scm_tc16_vport | mode_bits);
pt = SCM_PTAB_ENTRY(port);
pt->rw_random = 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
--
http://wingolog.org/
next prev parent reply other threads:[~2008-08-18 18:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 22:11 request reversion regarding scm_i_* removal Andy Wingo
2008-08-11 8:10 ` Ludovic Courtès
2008-08-18 18:36 ` Andy Wingo [this message]
2008-08-21 11:52 ` Ludovic Courtès
2008-08-30 19:28 ` Ludovic Courtès
2008-08-30 21:17 ` Neil Jerram
2008-08-31 10:24 ` Ludovic Courtès
2008-09-04 19:31 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3iqtyw4ok.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).