This commit is contained in:
Roberto Ierusalimschy 2005-02-28 12:59:11 -03:00
parent d6143b1d7b
commit 5eeff89f32
1 changed files with 26 additions and 14 deletions

View File

@ -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 ** Configuration file for Lua
** See Copyright Notice in lua.h ** 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; } #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 #ifndef __cplusplus
/* default handling with long jumps */ /* default handling with long jumps */
#include <setjmp.h> #include <setjmp.h>
@ -286,18 +290,20 @@ __inline int l_lrint (double flt)
/* /*
** macros for thread synchronization inside Lua core machine: ** macros for thread synchronization inside Lua core machine: This is
** all accesses to the global state and to global objects are synchronized. ** an attempt to simplify the implementation of a multithreaded version
** Because threads can read the stack of other threads ** of Lua. Do not change that unless you know what you are doing. all
** (when running garbage collection), ** accesses to the global state and to global objects are synchronized.
** a thread must also synchronize any write-access to its own stack. ** Because threads can read the stack of other threads (when running
** Unsynchronized accesses are allowed only when reading its own stack, ** garbage collection), a thread must also synchronize any write-access
** or when reading immutable fields from global objects ** to its own stack. Unsynchronized accesses are allowed only when
** (such as string values and udata values). ** 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_lock(L) ((void) 0)
#define lua_unlock(L) ((void) 0) #define lua_unlock(L) ((void) 0)
/* /*
** this macro allows a thread switch in appropriate places in the Lua ** this macro allows a thread switch in appropriate places in the Lua
** core ** core
@ -349,12 +355,14 @@ __inline int l_lrint (double flt)
#define LUA_PATH_MARK "?" #define LUA_PATH_MARK "?"
/* maximum number of captures in pattern-matching */ /* maximum number of captures in pattern-matching (arbitrary limit) */
#define MAX_CAPTURES 32 /* 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__ #ifdef __GNUC__
#define USE_TMPNAME 0 #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) #if defined(_WIN32)
#define USE_DLL #define USE_DLL