emacs-devel
[Top][All Lists]
Advanced

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

Re: __attribute__ ((cleanup)) and emacs-module.c


From: Po Lu
Subject: Re: __attribute__ ((cleanup)) and emacs-module.c
Date: Thu, 09 Mar 2023 21:31:38 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Philipp Stephani <phst@google.com> writes:

> This attribute is necessary at the moment because otherwise the
> handlerlist wouldn't get reset when returning from the module
> implementation functions. Without it, you'd need to audit every
> occurrence of "return" in the code (including the code generated by
> the helper macros) and reset the handlerlist manually. This is
> unrelated to C++ exception handling. It's not impossible to do this
> manually (it's not so different from the unbind_to calls in the Emacs
> codebase), but rather error-prone.

Yes, I know why it's necessary.  I'm up to doing what what it does by
hand in portable C.

Unmatched unbind_to's have never been a significant problem for us, so
this shouldn't either be.  Daniel, any comments?

Thanks.


reply via email to

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