emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding objects on C stack - alternate GCPRO


From: Ken Raeburn
Subject: Re: Finding objects on C stack - alternate GCPRO
Date: Wed, 16 Nov 2011 16:07:15 -0500

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]