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 modules: emacs-module.c and signaling errors Date: Wed, 25 Nov 2015 19:30:05 +0200 Message-ID: <837fl6xa02.fsf@gnu.org> References: <83k2p7xk13.fsf@gnu.org> <87wpt7p369.fsf@tromey.com> <83d1uzxgvw.fsf@gnu.org> <5654D7CF.90001@cs.ucla.edu> <87si3vox7j.fsf@tromey.com> <56555B52.3030703@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448472753 27252 80.91.229.3 (25 Nov 2015 17:32:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 17:32:33 +0000 (UTC) Cc: dancol@dancol.org, tzz@lifelogs.com, emacs-devel@gnu.org, p.stephani2@gmail.com, aurelien.aptel+emacs@gmail.com, tom@tromey.com To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 25 18:32:20 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 1a1dvR-00046q-Ov for ged-emacs-devel@m.gmane.org; Wed, 25 Nov 2015 18:32:13 +0100 Original-Received: from localhost ([::1]:46863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1dvT-0003f7-JU for ged-emacs-devel@m.gmane.org; Wed, 25 Nov 2015 12:32:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1dv7-0003QC-Sd for emacs-devel@gnu.org; Wed, 25 Nov 2015 12:31:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1dv3-0002bQ-AK for emacs-devel@gnu.org; Wed, 25 Nov 2015 12:31:53 -0500 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:42066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1dv3-0002bK-36 for emacs-devel@gnu.org; Wed, 25 Nov 2015 12:31:49 -0500 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NYD00700S3C4M00@mtaout27.012.net.il> for emacs-devel@gnu.org; Wed, 25 Nov 2015 19:25:05 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYD006TWSDTGJ10@mtaout27.012.net.il>; Wed, 25 Nov 2015 19:25:05 +0200 (IST) In-reply-to: <56555B52.3030703@cs.ucla.edu> 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.183 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:195229 Archived-At: > Cc: Eli Zaretskii , aurelien.aptel+emacs@gmail.com, > p.stephani2@gmail.com, dancol@dancol.org, tzz@lifelogs.com, > emacs-devel@gnu.org > From: Paul Eggert > Date: Tue, 24 Nov 2015 22:55:14 -0800 > > Tom Tromey wrote: > > The alternative is also error-prone though. It's very easy to forget > > that some cleanup is needed; and the Emacs facilities here aren't really > > all that easy to use either. > > We're talking about memory allocation here. If Emacs allocates the memory, the > caller shouldn't need to clean up, as the Emacs garbage collector can do that. > This should be less error-prone. Maybe I misunderstand the issue, but AFAICS any Lisp data that is allocated by emacs-module.c on behalf of modules already goes through xmalloc, so what exactly are the remaining problems?