From: Ken Raeburn <raeburn@raeburn.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: Re: Finding objects on C stack - alternate GCPRO
Date: Wed, 16 Nov 2011 16:07:15 -0500 [thread overview]
Message-ID: <05E78D9D-CA66-4582-82EF-AA9CB5110B24@raeburn.org> (raw)
In-Reply-To: <4EC38B72.1000101@yandex.ru>
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
prev parent reply other threads:[~2011-11-16 21:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 10:07 Finding objects on C stack - alternate GCPRO Dmitry Antipov
2011-11-16 10:18 ` Helmut Eller
2011-11-16 10:33 ` Dmitry Antipov
2011-11-16 23:27 ` Richard Stallman
2011-11-17 4:17 ` Stephen J. Turnbull
2011-11-17 19:12 ` Richard Stallman
2011-11-16 11:06 ` Eli Zaretskii
2011-11-17 12:50 ` Stephen Berman
2011-11-17 16:50 ` Eli Zaretskii
2011-11-16 14:41 ` Stefan Monnier
2011-11-16 18:19 ` Tom Tromey
2011-11-16 21:07 ` Ken Raeburn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=05E78D9D-CA66-4582-82EF-AA9CB5110B24@raeburn.org \
--to=raeburn@raeburn.org \
--cc=dmantipov@yandex.ru \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.