From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Finding objects on C stack - alternate GCPRO Date: Wed, 16 Nov 2011 16:07:15 -0500 Message-ID: <05E78D9D-CA66-4582-82EF-AA9CB5110B24@raeburn.org> References: <4EC38B72.1000101@yandex.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1321477648 15457 80.91.229.12 (16 Nov 2011 21:07:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 Nov 2011 21:07:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 16 22:07:23 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RQmhW-0004Dx-Io for ged-emacs-devel@m.gmane.org; Wed, 16 Nov 2011 22:07:22 +0100 Original-Received: from localhost ([::1]:59382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQmhV-0003lk-Vf for ged-emacs-devel@m.gmane.org; Wed, 16 Nov 2011 16:07:21 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQmhT-0003le-QZ for emacs-devel@gnu.org; Wed, 16 Nov 2011 16:07:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQmhS-0004d6-PC for emacs-devel@gnu.org; Wed, 16 Nov 2011 16:07:19 -0500 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:42450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQmhS-0004cx-MG for emacs-devel@gnu.org; Wed, 16 Nov 2011 16:07:18 -0500 Original-Received: by vcbfo11 with SMTP id fo11so1174051vcb.0 for ; Wed, 16 Nov 2011 13:07:17 -0800 (PST) Original-Received: by 10.52.26.47 with SMTP id i15mr53781574vdg.0.1321477637194; Wed, 16 Nov 2011 13:07:17 -0800 (PST) Original-Received: from [10.1.12.37] (vpn.permabit.com. [204.246.225.2]) by mx.google.com with ESMTPS id co10sm8969151vdc.0.2011.11.16.13.07.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Nov 2011 13:07:16 -0800 (PST) In-Reply-To: <4EC38B72.1000101@yandex.ru> X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 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:146065 Archived-At: On Nov 16, 2011, at 05:07, Dmitry Antipov wrote: > But there is another method to implement GCPROs. It looks not very > portable beyond GNU C since it uses __attribute__ ((cleanup = (function))) > and compound statement expressions C extensions. But it doesn't > require UNGCPRO and dumbs like 'struct gcpro gcpro1, struct gcpro2, = ...'. > And I believe it should work across longjmps. I'm not terribly familiar with the cleanup attribute's implementation, = but I'm curious to know how it would work in the face of longjmp, which = tends to be pretty simple in how it operates and without regard for such = things as exception handlers or object destructor functions (which I = would expect the implementation of "cleanup" to piggy-back on). Ken=