From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: __attribute__ ((cleanup)) and emacs-module.c Date: Thu, 09 Mar 2023 21:31:38 +0800 Message-ID: <87r0tyhwzp.fsf@yahoo.com> References: <87edq7ztks.fsf.ref@yahoo.com> <878rgaspvs.fsf@yahoo.com> <86bkl6z1sc.fsf@aarsen.me> <87mt4qqi2o.fsf@yahoo.com> <83a60q84eo.fsf@gnu.org> <87a60qqb0c.fsf@yahoo.com> <83y1oa6k71.fsf@gnu.org> <87sfehpfcv.fsf@yahoo.com> <83a60o7mif.fsf@gnu.org> <87jzzspvcl.fsf@yahoo.com> <83ttyw65v5.fsf@gnu.org> <4B15D851-5638-48E6-A789-3017A1CBA971@yahoo.com> <8584ff7c-f83e-18b1-1300-dfa0788e4443@cs.ucla.edu> <87v8jbohk4.fsf@yahoo.com> <831qlz5pas.fsf@gnu.org> <87356en2w7.fsf@yahoo.com> <83o7p22xq4.fsf@gnu.org> <875ybal55j.fsf@yahoo.com> <83fsae2sc3.fsf@gnu.org> <87cz5ijkek.fsf_-_@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10594"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , eggert@cs.ucla.edu, arsen@aarsen.me, emacs-devel@gnu.org, Daniel Colascione To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 09 14:32:46 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1paGNy-0002dV-2o for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Mar 2023 14:32:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paGN6-0001WL-Kl; Thu, 09 Mar 2023 08:31:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paGN4-0001Vo-O3 for emacs-devel@gnu.org; Thu, 09 Mar 2023 08:31:50 -0500 Original-Received: from sonic312-20.consmr.mail.bf2.yahoo.com ([74.6.128.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paGN3-0003n6-9G for emacs-devel@gnu.org; Thu, 09 Mar 2023 08:31:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678368707; bh=B6mp6CKkDGHl7JUApnStH+J9ruYEVJDPic0tZI2r8sU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=lJToDpAZs7ivfSPs/IUbucj+eCf7iGB8qT9SiBDORbt3fohr6RFnSdCHQNW94C/3cGqmLdqeoaTwiP44aOTqcBUm/7NB2jUfdzntN/T1rnpvTJYBsu9nN7Lh/9z6JaQkBgf7Hf6vgJpPbOkuyeXjvwjYRj/ncX6E+W3tBUXc5Ljd/2yKkOvAJe/LHtOe0XBNfXsST0s6N/hCy5Gcp3/OGEsYdY/9UE3XtAT9CiLIaCKoydfUzE4ATKXrX+WIBKdi0DxhpzSgiqnbIus/8Xpe7BmhsgxV8i1vJqZsLzqbyu0Mur9VWK2XQwP7RiZyn0xFkcApiBUfXtHs/7hq1jb/AA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678368707; bh=22UKzsTTRps8sVl7GGM1QN6ld+O9bhZ0Gk4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QQPSjce2tqxyzbN7ktmTpqEv0xFYlPR_ukyqGx70UiBBWD510xYR4Or5hNimGFdnOVj_ Gx1HfUvsMYAu1DDaLGqOeFhxv30Hm7vtt4i3Mq_aUcrDoiHGhQ11omgfEKoXUdTrCRrvCDvaZvbz Vfv9wzwSpXXgRZGkpnaIyCN_JlzNLObthU__jFJp5F X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Thu, 9 Mar 2023 13:31:47 +0000 Original-Received: by hermes--production-sg3-67c57bccff-l44jm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e2e96dc16847cbfdfd8819e36bf3e0e7; Thu, 09 Mar 2023 13:31:43 +0000 (UTC) In-Reply-To: (Philipp Stephani's message of "Thu, 9 Mar 2023 13:56:28 +0100") X-Mailer: WebService/1.1.21284 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=74.6.128.82; envelope-from=luangruo@yahoo.com; helo=sonic312-20.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304202 Archived-At: Philipp Stephani 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.