]> code.delx.au - gnu-emacs/blobdiff - src/emacs-module.c
Remove buggy non-native image scrolling
[gnu-emacs] / src / emacs-module.c
index def77e3570a387c53fc133675a0d5231407e6b2a..eca5af739b92846c6be69e7d83435159e8f8035b 100644 (file)
@@ -1,13 +1,13 @@
 /* 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.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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