From: Eric Wong Date: Sat, 9 Sep 2023 12:01:40 +0000 (+0000) Subject: xap_helper: note __cleanup__ works with C++ exceptions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e37f2548f099c5e8412e1ba1e1fa850c9f8f295;p=thirdparty%2Fpublic-inbox.git xap_helper: note __cleanup__ works with C++ exceptions In case somebody reviewing this code gets curious. --- diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h index 707603676..3f45e1c70 100644 --- a/lib/PublicInbox/xap_helper.h +++ b/lib/PublicInbox/xap_helper.h @@ -322,6 +322,9 @@ struct dump_roots_tmp { int root2id_fd; }; +// n.b. __cleanup__ works fine with C++ exceptions, but not longjmp +// Only clang and g++ are supported, as AFAIK there's no other +// relevant Free(-as-in-speech) C++ compilers. #define CLEANUP_FBUF __attribute__((__cleanup__(fbuf_ensure))) static void fbuf_ensure(void *ptr) {