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: emacs-dynamic-module in Emacs Git? Date: Mon, 01 Dec 2014 19:44:30 +0200 Message-ID: <83wq6b6z9d.fsf@gnu.org> References: <87k32sh50f.fsf@lifelogs.com> <85tx1rg64e.fsf_-_@stephe-leake.org> <87siha7r3b.fsf@lifelogs.com> <87lhmz4mtj.fsf@lifelogs.com> <87sih575rc.fsf@lifelogs.com> <8361dyaqf1.fsf@gnu.org> <837fycae5p.fsf@gnu.org> <87y4qs19mi.fsf@lifelogs.com> <874mtfu0et.fsf@lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1417455903 3724 80.91.229.3 (1 Dec 2014 17:45:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 17:45:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?Aur=C3=A9lien?= Aptel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 01 18:44:54 2014 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 1XvV1p-0006p7-Uq for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 18:44:54 +0100 Original-Received: from localhost ([::1]:32979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvV1p-0002FR-JI for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 12:44:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvV1V-0002Bd-4s for emacs-devel@gnu.org; Mon, 01 Dec 2014 12:44:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvV1N-00012h-M4 for emacs-devel@gnu.org; Mon, 01 Dec 2014 12:44:33 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:65024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvV1N-00012L-Dm for emacs-devel@gnu.org; Mon, 01 Dec 2014 12:44:25 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NFW00L00ZWPVY00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 01 Dec 2014 19:44:24 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFW00LQYZXZC670@a-mtaout20.012.net.il>; Mon, 01 Dec 2014 19:44:24 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:178608 Archived-At: > Date: Mon, 1 Dec 2014 17:28:01 +0100 > From: Aur=C3=A9lien Aptel >=20 > Stefan's 3 part plan is sound. >=20 > I agree that using any Emacs function in modules is too fragile and= we > need to define a subset or a new layer to expose Emacs features to > modules. Note that there are several possible ways of doing this, and IMO we should decide which one we would like to use. One possibility is not to create Lisp objects in the module, but instead ask Emacs to create an object and hand it to the module. Another possibility is to expose an array of function pointers throug= h which modules will call Emacs functions. (This alternative avoids th= e problems on Windows that require an import library.) In any case, freeing memory should always be done on the same side of the divide as its allocation.