|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
-** $Id: luaconf.h,v 1.28 2005/02/10 17:12:02 roberto Exp roberto $
|
|
|
+** $Id: luaconf.h,v 1.29 2005/02/23 17:30:22 roberto Exp roberto $
|
|
|
** Configuration file for Lua
|
|
|
** See Copyright Notice in lua.h
|
|
|
*/
|
|
@@ -267,7 +267,11 @@ __inline int l_lrint (double flt)
|
|
|
#define LUSER_ALIGNMENT_T union { double u; void *s; long l; }
|
|
|
|
|
|
|
|
|
-/* exception handling */
|
|
|
+/*
|
|
|
+** exception handling: by default, Lua handles errors with longjmp/setjmp
|
|
|
+** when compiling as C code and with exceptions when compiling as C++ code.
|
|
|
+** Change that if you prefer to use longjmp/setjmp even with C++.
|
|
|
+*/
|
|
|
#ifndef __cplusplus
|
|
|
/* default handling with long jumps */
|
|
|
#include <setjmp.h>
|
|
@@ -286,18 +290,20 @@ __inline int l_lrint (double flt)
|
|
|
|
|
|
|
|
|
/*
|
|
|
-** macros for thread synchronization inside Lua core machine:
|
|
|
-** all accesses to the global state and to global objects are synchronized.
|
|
|
-** Because threads can read the stack of other threads
|
|
|
-** (when running garbage collection),
|
|
|
-** a thread must also synchronize any write-access to its own stack.
|
|
|
-** Unsynchronized accesses are allowed only when reading its own stack,
|
|
|
-** or when reading immutable fields from global objects
|
|
|
-** (such as string values and udata values).
|
|
|
+** macros for thread synchronization inside Lua core machine: This is
|
|
|
+** an attempt to simplify the implementation of a multithreaded version
|
|
|
+** of Lua. Do not change that unless you know what you are doing. all
|
|
|
+** accesses to the global state and to global objects are synchronized.
|
|
|
+** Because threads can read the stack of other threads (when running
|
|
|
+** garbage collection), a thread must also synchronize any write-access
|
|
|
+** to its own stack. Unsynchronized accesses are allowed only when
|
|
|
+** reading its own stack, or when reading immutable fields from global
|
|
|
+** objects (such as string values and udata values).
|
|
|
*/
|
|
|
#define lua_lock(L) ((void) 0)
|
|
|
#define lua_unlock(L) ((void) 0)
|
|
|
|
|
|
+
|
|
|
/*
|
|
|
** this macro allows a thread switch in appropriate places in the Lua
|
|
|
** core
|
|
@@ -349,12 +355,14 @@ __inline int l_lrint (double flt)
|
|
|
#define LUA_PATH_MARK "?"
|
|
|
|
|
|
|
|
|
-/* maximum number of captures in pattern-matching */
|
|
|
-#define MAX_CAPTURES 32 /* arbitrary limit */
|
|
|
+/* maximum number of captures in pattern-matching (arbitrary limit) */
|
|
|
+#define MAX_CAPTURES 32
|
|
|
|
|
|
|
|
|
/*
|
|
|
-** by default, gcc does not get `tmpname'
|
|
|
+** by default, gcc does not get `os.tmpname', because it generates a warning
|
|
|
+** when using `tmpname'. Change that if you really want (or do not want)
|
|
|
+** `os.tmpname' available.
|
|
|
*/
|
|
|
#ifdef __GNUC__
|
|
|
#define USE_TMPNAME 0
|
|
@@ -364,7 +372,11 @@ __inline int l_lrint (double flt)
|
|
|
|
|
|
|
|
|
/*
|
|
|
-** Configuration for loadlib
|
|
|
+** Configuration for loadlib: Lua tries to guess the dynamic-library
|
|
|
+** system that your platform uses (either Windows' DLL, Mac's dyld, or
|
|
|
+** dlopen). If your system is some kind of Unix, there is a good chance
|
|
|
+** that USE_DLOPEN will work for it. You may need to adapt also the
|
|
|
+** makefile.
|
|
|
*/
|
|
|
#if defined(_WIN32)
|
|
|
#define USE_DLL
|