From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Fri, 13 Feb 2015 21:11:21 +0200 Message-ID: <8338694ofa.fsf@gnu.org> References: <83y4oiiw81.fsf@gnu.org> <838ugdf251.fsf@gnu.org> <54D80098.3020209@cs.ucla.edu> <54D85304.1030600@cs.ucla.edu> <54D9AC29.2020603@cs.ucla.edu> <54DA8539.1020905@cs.ucla.edu> <87zj8ktq8f.fsf@lifelogs.com> <54DD6413.1000403@cs.ucla.edu> <83wq3m436s.fsf@gnu.org> <54DDEB4D.5040300@dancol> <83egpt4zz6.fsf@gnu.org> <54DE12E9.504@[87.69.4.28]> <83a90h4xr8.fsf@gnu.org> <54DE1F14.9010807@dancol.org> <838ug14wti.fsf@gnu.org> <54D@[87.69.4.28]> <8361b54upa.fsf@gnu.org> <54DE2F87.8040704@cs.ucla.edu> <54DE380F.3020508@dancol.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423854704 11893 80.91.229.3 (13 Feb 2015 19:11:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2015 19:11:44 +0000 (UTC) Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 13 20:11:36 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMLeI-0006DQ-FJ for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2015 20:11:34 +0100 Original-Received: from localhost ([::1]:57180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMLeH-0000kW-Os for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2015 14:11:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMLeE-0000jr-5x for emacs-devel@gnu.org; Fri, 13 Feb 2015 14:11:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMLe9-0003Hz-2h for emacs-devel@gnu.org; Fri, 13 Feb 2015 14:11:30 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:38095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMLe8-0003Hp-RC for emacs-devel@gnu.org; Fri, 13 Feb 2015 14:11:25 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NJQ00I004PTL300@mtaout25.012.net.il> for emacs-devel@gnu.org; Fri, 13 Feb 2015 21:06:10 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJQ00IQL52ABM10@mtaout25.012.net.il>; Fri, 13 Feb 2015 21:06:10 +0200 (IST) In-reply-to: <54DE380F.3020508@dancol.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183019 Archived-At: > Date: Fri, 13 Feb 2015 09:44:47 -0800 > From: Daniel Colascione > Cc: emacs-devel@gnu.org > > struct emacs_runtime { > /* Return NULL on failure */ > struct emacs_interface* (*init)( > int interface_version, > const char* my_license); > }; > > struct emacs_interface_1 { > /* Err, something like this */ > struct emacs_value* (*defun)(const char* name, int nargs); > struct emacs_value* (*funcall)(struct emacs_value* func, ...); > }; > > /* Exported by loadable modules and called on load. > Return 0 on success or -1 on error. */ > extern int emacs_init(struct emacs_runtime*); > > This way, Emacs itself doesn't need to export any symbols and it can > support multiple interface versions sanely. IOW, you suggest that the interface will be through function pointers. That's how Gawk does it. This method (and any other) will need function pointers to create Lisp data structures, though. Like strings, lists, vectors, etc.