]> code.delx.au - gnu-emacs/blobdiff - src/emacs-module.c
* src/syntax.c (syntax_multibyte): Omit unnecessary parens.
[gnu-emacs] / src / emacs-module.c
index def77e3570a387c53fc133675a0d5231407e6b2a..79a077b3cb4b8ac7ee8db8802093f32173658e1f 100644 (file)
@@ -1,6 +1,6 @@
 /* emacs-module.c - Module loading and runtime implementation
 
-Copyright (C) 2015 Free Software Foundation, Inc.
+Copyright (C) 2015-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -35,8 +35,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 \f
 /* Feature tests.  */
 
-/* True if __attribute__ ((cleanup (...))) works, false otherwise.  */
-#ifdef HAVE_VAR_ATTRIBUTE_CLEANUP
+#if __has_attribute (cleanup)
 enum { module_has_cleanup = true };
 #else
 enum { module_has_cleanup = false };
@@ -65,6 +64,12 @@ enum
         && INTPTR_MAX == EMACS_INT_MAX)
   };
 
+/* Function prototype for module user-pointer finalizers.  These
+   should not throw C++ exceptions, so emacs-module.h declares the
+   corresponding interfaces with EMACS_NOEXCEPT.  There is only C code
+   in this module, though, so this constraint is not enforced here.  */
+typedef void (*emacs_finalizer_function) (void *);
+
 \f
 /* Private runtime and environment members.  */
 
@@ -121,7 +126,7 @@ static emacs_value const module_nil = 0;
 /* Convenience macros for non-local exit handling.  */
 
 /* FIXME: The following implementation for non-local exit handling
-   does not work with stack overflow detection.  */
+   does not support recovery from stack overflow, see sysdep.c.  */
 
 /* Emacs uses setjmp and longjmp for non-local exits, but
    module frames cannot be skipped because they are in general