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,gmane.comp.gnu.lilypond.devel Subject: Re: %module-public-interface Date: Fri, 02 Apr 2010 11:37:41 +0200 Message-ID: <87y6h6kxei.fsf@gnu.org> References: <87zl1pv89p.fsf@gnu.org> <87d3ylv5oe.fsf@gnu.org> <4BB53617.7060700@hulin.org.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1270201115 25523 80.91.229.12 (2 Apr 2010 09:38:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Apr 2010 09:38:35 +0000 (UTC) Cc: "lilypond-devel@gnu.org" , guile-devel@gnu.org To: Ian Hulin Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 02 11:38:31 2010 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.69) (envelope-from ) id 1NxdKh-0002Sg-1E for guile-devel@m.gmane.org; Fri, 02 Apr 2010 11:38:31 +0200 Original-Received: from localhost ([127.0.0.1]:57800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxdKg-0006LU-4t for guile-devel@m.gmane.org; Fri, 02 Apr 2010 05:38:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxdK4-0006Hx-OC for guile-devel@gnu.org; Fri, 02 Apr 2010 05:37:52 -0400 Original-Received: from [140.186.70.92] (port=53572 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxdK2-0006Hp-7T for guile-devel@gnu.org; Fri, 02 Apr 2010 05:37:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxdK1-0005Xr-83 for guile-devel@gnu.org; Fri, 02 Apr 2010 05:37:50 -0400 Original-Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:46789) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxdJv-0005X6-Pe; Fri, 02 Apr 2010 05:37:43 -0400 X-IronPort-AV: E=Sophos;i="4.51,352,1267398000"; d="scan'208";a="47908920" Original-Received: from reverse-83.fdn.fr (HELO nixey) ([80.67.176.83]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 02 Apr 2010 11:37:41 +0200 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 13 Germinal an 218 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <4BB53617.7060700@hulin.org.uk> (Ian Hulin's message of "Fri, 02 Apr 2010 01:11:03 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:10135 gmane.comp.gnu.lilypond.devel:28272 Archived-At: Hi Ian, Ian Hulin writes: > On 30/03/10 22:52, Ludovic =EF=BF=BD wrote: >> Andy Wingo writes: >> >>> On Tue 30 Mar 2010 22:56, ludo@gnu.org (Ludovic Court=C3=A8s) writes: >>> >>>>> I'm pretty sure that the submodule thing can be changed without any >>>>> problem. But it seems that the %module-public-interface is used >>>>> explicitly, at least by texmacs and lilypond. >>>> >>>> How do they use it? >>> >>> Linking to the evil empire: >>> >>> http://www.google.com/codesearch?hl=3Den&lr=3D&q=3D%25module-public-int= erface&sbtn=3DSearch >>> http://www.google.com/codesearch?hl=3Den&lr=3D&q=3D%25module-public-int= erface+lang%3Ac%2B%2B&sbtn=3DSearch >> >> Lilypond does: >> >> --8<---------------cut here---------------start------------->8--- >> mod =3D scm_call_0 (maker); >> scm_module_define (mod, ly_symbol2scm ("%module-public-interface"= ), >> mod); >> --8<---------------cut here---------------end--------------->8--- >> >> Solution: do something like: >> >> --8<---------------cut here---------------start------------->8--- >> #ifdef HAVE_SCM_SET_MODULE_PUBLIC_INTERFACE_X >> scm_set_module_public_interface_x (mod, mod); >> #else >> scm_module_define (mod, ly_symbol2scm ("%module-public-interface"), >> mod); >> #endif >> --8<---------------cut here---------------end--------------->8--- >> >> (We just need to add that function.) >> > >> TeXmacs does: > >>>> And we could add a =E2=80=98public-interface=E2=80=99 slot to =E2=80= =98module-type=E2=80=99 and have >>>> =E2=80=98module-public-interface=E2=80=99 and =E2=80=98set-module-publ= ic-interface!=E2=80=99 refer to >>>> it; for backward compatibility we=E2=80=99d also initialize the >>>> =E2=80=98%module-public-interface=E2=80=99 binding. How does it sound? >> >> Actually the trick wouldn=E2=80=99t work in cases where the >> =E2=80=98%module-public-interface=E2=80=99 binding is mutated, as with L= ilypond. >> >> Given this and the above examples, I=E2=80=99d suggest dropping that bin= ding >> completely and sending patches to the Lilypond/TeXmacs people. >> >> What do you think? > > If you do add scm_set_module_public_interface_x, could you back-port > it to Guile V1.8.6 and V1.8.7? We could back-port it to the 1.8 series, but not to the already-released 1.8.7 and 1.8.6. We=E2=80=99d have to make a 1.8.8 release, but I=E2=80=99= m not sure that would really help anyway since that would force Lilypond users to switch to that version. > Those are the lowest versions of Guile the upcoming stable release of > Lilypond will support. How about doing #ifdef HAVE_SCM_SET_MODULE_PUBLIC_INTERFACE_X in your code? We still have to agree on the change and actually implement it, the latter being easy. ;-) When is the new Lilypond release due? Thanks, Ludo=E2=80=99.