/* 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.
\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 };
&& 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. */
/* 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