]> git.eshelyaron.com Git - emacs.git/commitdiff
Inline module_has_cleanup
authorPhilipp Stephani <phst@google.com>
Mon, 5 Jun 2017 08:19:59 +0000 (10:19 +0200)
committerPhilipp Stephani <phst@google.com>
Mon, 5 Jun 2017 08:19:59 +0000 (10:19 +0200)
This constant is only used once, and we fail compilation anyway if
it's false.

* src/emacs-module.c (MODULE_SETJMP_1): Inline __has_attribute.

src/emacs-module.c

index 8ddf157b39fbd4eccf1b3dd71f2c5f6c7f22fe90..71e04d869e9a0d69204d26bf59d27ade9fbace5c 100644 (file)
@@ -37,12 +37,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 \f
 /* Feature tests.  */
 
-#if __has_attribute (cleanup)
-enum { module_has_cleanup = true };
-#else
-enum { module_has_cleanup = false };
-#endif
-
 #ifdef WINDOWSNT
 #include <windows.h>
 #include "w32term.h"
@@ -168,7 +162,7 @@ static emacs_value const module_nil = 0;
       module_out_of_memory (env);                                      \
       return retval;                                                   \
     }                                                                  \
-  verify (module_has_cleanup);                                         \
+  verify (__has_attribute (cleanup));                                   \
   struct handler *c __attribute__ ((cleanup (module_reset_handlerlist))) \
     = c0;                                                              \
   if (sys_setjmp (c->jmp))                                             \