]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
xap_helper: note __cleanup__ works with C++ exceptions
authorEric Wong <e@80x24.org>
Sat, 9 Sep 2023 12:01:40 +0000 (12:01 +0000)
committerEric Wong <e@80x24.org>
Sat, 9 Sep 2023 21:44:01 +0000 (21:44 +0000)
In case somebody reviewing this code gets curious.

lib/PublicInbox/xap_helper.h

index 70760367685f4ae0482ce3c81c6f65eaae439d16..3f45e1c7054235d3893d6cb2265e5cfb79ae71c4 100644 (file)
@@ -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)
 {