From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Hulin Newsgroups: gmane.lisp.guile.devel,gmane.comp.gnu.lilypond.devel Subject: Re: %module-public-interface Date: Fri, 02 Apr 2010 01:11:03 +0100 Message-ID: <4BB53617.7060700@hulin.org.uk> References: <87zl1pv89p.fsf@gnu.org> <87d3ylv5oe.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1270167103 12985 80.91.229.12 (2 Apr 2010 00:11:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Apr 2010 00:11:43 +0000 (UTC) Cc: "lilypond-devel@gnu.org" , guile-devel@gnu.org To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 02 02:11:39 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 1NxUU3-0001sy-TD for guile-devel@m.gmane.org; Fri, 02 Apr 2010 02:11:36 +0200 Original-Received: from localhost ([127.0.0.1]:48967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxUU2-0001qj-SU for guile-devel@m.gmane.org; Thu, 01 Apr 2010 20:11:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxUTu-0001pz-45 for guile-devel@gnu.org; Thu, 01 Apr 2010 20:11:26 -0400 Original-Received: from [140.186.70.92] (port=39220 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxUTs-0001pL-8e for guile-devel@gnu.org; Thu, 01 Apr 2010 20:11:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxUTq-0001ET-IU for guile-devel@gnu.org; Thu, 01 Apr 2010 20:11:24 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:39944) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxUTq-0001EF-8T for guile-devel@gnu.org; Thu, 01 Apr 2010 20:11:22 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NxUTo-0001mk-35 for guile-devel@gnu.org; Fri, 02 Apr 2010 02:11:20 +0200 Original-Received: from cpc3-rdng6-0-0-cust547.winn.cable.ntl.com ([82.10.50.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Apr 2010 02:11:20 +0200 Original-Received: from ian by cpc3-rdng6-0-0-cust547.winn.cable.ntl.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Apr 2010 02:11:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 66 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc3-rdng6-0-0-cust547.winn.cable.ntl.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 In-Reply-To: <87d3ylv5oe.fsf@gnu.org> X-detected-operating-system: by eggs.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:10133 gmane.comp.gnu.lilypond.devel:28268 Archived-At: Hi Ludovic, On 30/03/10 22:52, Ludovic � wrote: > Hello, > > Andy Wingo writes: > >> On Tue 30 Mar 2010 22:56, ludo@gnu.org (Ludovic Courtès) 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=en&lr=&q=%25module-public-interface&sbtn=Search >> http://www.google.com/codesearch?hl=en&lr=&q=%25module-public-interface+lang%3Ac%2B%2B&sbtn=Search > > Lilypond does: > > --8<---------------cut here---------------start------------->8--- > mod = 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 ‘public-interface’ slot to ‘module-type’ and have >>> ‘module-public-interface’ and ‘set-module-public-interface!’ refer to >>> it; for backward compatibility we’d also initialize the >>> ‘%module-public-interface’ binding. How does it sound? > > Actually the trick wouldn’t work in cases where the > ‘%module-public-interface’ binding is mutated, as with Lilypond. > > Given this and the above examples, I’d suggest dropping that binding > 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? Those are the lowest versions of Guile the upcoming stable release of Lilypond will support. Cheers, Ian Hulin