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: Sun, 15 Feb 2015 21:28:29 +0200 Message-ID: <838ufzug82.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> <834mqowbnh.fsf@gnu.org> <85egpsgf5z.fsf@stephe-leake.org> <83oaovull2.fsf@gnu.org> <85y4nzat5m.fsf@stephe-leake.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1424028535 25516 80.91.229.3 (15 Feb 2015 19:28:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Feb 2015 19:28:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 15 20:28:45 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 1YN4s0-0000aI-KX for ged-emacs-devel@m.gmane.org; Sun, 15 Feb 2015 20:28:44 +0100 Original-Received: from localhost ([::1]:36358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN4s0-0004aL-4N for ged-emacs-devel@m.gmane.org; Sun, 15 Feb 2015 14:28:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN4rq-0004PG-Ah for emacs-devel@gnu.org; Sun, 15 Feb 2015 14:28:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YN4rk-0001yV-4L for emacs-devel@gnu.org; Sun, 15 Feb 2015 14:28:34 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:43028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN4rj-0001xt-OO for emacs-devel@gnu.org; Sun, 15 Feb 2015 14:28:28 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NJT00700USF2K00@mtaout24.012.net.il> for emacs-devel@gnu.org; Sun, 15 Feb 2015 21:20:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJT00OPTV1JRV80@mtaout24.012.net.il>; Sun, 15 Feb 2015 21:20:07 +0200 (IST) In-reply-to: <85y4nzat5m.fsf@stephe-leake.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.180 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:183113 Archived-At: > From: Stephen Leake > Date: Sun, 15 Feb 2015 13:09:25 -0600 > > > That "metainfo", whatever it will be, will also have to support > > compilation of modules: we need to know at compile time what values of > > USE_LSB_TAG, ENABLE_CHECKING, WIDE_EMACS_INT, optimization flags, > > etc. were used when Emacs was built, because those affect the layout > > of objects inside Emacs and also the availability of certain functions > > in the Emacs binary. > > Right. > > One solution is to only distribute source, and provide an elisp function > 'module-make' (suggested by Stefan) that provides command-line options > to a module makefile for all of those settings. That's a beginning, but it cannot be all there is to, because modules should be distributable in binary form as well, at least some Linux distributions will probably want that. > So let's take a stab at something closer to your approach. > > I'm not familiar with the idioms for making an opaque type in C; would > that just be a pointer to void? something like: > > typedef void* Lisp_Object_Ptr; I'd go with typedef intmax_t Lisp_Object; This should be wide enough to hold both a pointer and the widest integer type, although I think its being wide enough for a pointer is not guaranteed by the C standard. Another suggestion, from Stefan, was to use EMACS_INT, but I'm not sure we will be able to define it correctly without dragging in too much stuff from lisp.h that is used there to define EMACS_INT. Maybe we should have a separate definition of EMACS_INT for modules.