diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-02-28 12:59:11 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-02-28 12:59:11 -0300 |
commit | 5eeff89f32df831c94cb3ee4ba79abf6f702110f (patch) | |
tree | 588ea1bcb8c7e9e079265e52d65c0ed0fe3fcc4c /luaconf.h | |
parent | d6143b1d7b44f0cc83202ee473f314a2d56372c0 (diff) | |
download | lua-5eeff89f32df831c94cb3ee4ba79abf6f702110f.tar.gz lua-5eeff89f32df831c94cb3ee4ba79abf6f702110f.tar.bz2 lua-5eeff89f32df831c94cb3ee4ba79abf6f702110f.zip |
comments
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 40 |
1 files changed, 26 insertions, 14 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.28 2005/02/10 17:12:02 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.29 2005/02/23 17:30:22 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -267,7 +267,11 @@ __inline int l_lrint (double flt) | |||
267 | #define LUSER_ALIGNMENT_T union { double u; void *s; long l; } | 267 | #define LUSER_ALIGNMENT_T union { double u; void *s; long l; } |
268 | 268 | ||
269 | 269 | ||
270 | /* exception handling */ | 270 | /* |
271 | ** exception handling: by default, Lua handles errors with longjmp/setjmp | ||
272 | ** when compiling as C code and with exceptions when compiling as C++ code. | ||
273 | ** Change that if you prefer to use longjmp/setjmp even with C++. | ||
274 | */ | ||
271 | #ifndef __cplusplus | 275 | #ifndef __cplusplus |
272 | /* default handling with long jumps */ | 276 | /* default handling with long jumps */ |
273 | #include <setjmp.h> | 277 | #include <setjmp.h> |
@@ -286,18 +290,20 @@ __inline int l_lrint (double flt) | |||
286 | 290 | ||
287 | 291 | ||
288 | /* | 292 | /* |
289 | ** macros for thread synchronization inside Lua core machine: | 293 | ** macros for thread synchronization inside Lua core machine: This is |
290 | ** all accesses to the global state and to global objects are synchronized. | 294 | ** an attempt to simplify the implementation of a multithreaded version |
291 | ** Because threads can read the stack of other threads | 295 | ** of Lua. Do not change that unless you know what you are doing. all |
292 | ** (when running garbage collection), | 296 | ** accesses to the global state and to global objects are synchronized. |
293 | ** a thread must also synchronize any write-access to its own stack. | 297 | ** Because threads can read the stack of other threads (when running |
294 | ** Unsynchronized accesses are allowed only when reading its own stack, | 298 | ** garbage collection), a thread must also synchronize any write-access |
295 | ** or when reading immutable fields from global objects | 299 | ** to its own stack. Unsynchronized accesses are allowed only when |
296 | ** (such as string values and udata values). | 300 | ** reading its own stack, or when reading immutable fields from global |
301 | ** objects (such as string values and udata values). | ||
297 | */ | 302 | */ |
298 | #define lua_lock(L) ((void) 0) | 303 | #define lua_lock(L) ((void) 0) |
299 | #define lua_unlock(L) ((void) 0) | 304 | #define lua_unlock(L) ((void) 0) |
300 | 305 | ||
306 | |||
301 | /* | 307 | /* |
302 | ** this macro allows a thread switch in appropriate places in the Lua | 308 | ** this macro allows a thread switch in appropriate places in the Lua |
303 | ** core | 309 | ** core |
@@ -349,12 +355,14 @@ __inline int l_lrint (double flt) | |||
349 | #define LUA_PATH_MARK "?" | 355 | #define LUA_PATH_MARK "?" |
350 | 356 | ||
351 | 357 | ||
352 | /* maximum number of captures in pattern-matching */ | 358 | /* maximum number of captures in pattern-matching (arbitrary limit) */ |
353 | #define MAX_CAPTURES 32 /* arbitrary limit */ | 359 | #define MAX_CAPTURES 32 |
354 | 360 | ||
355 | 361 | ||
356 | /* | 362 | /* |
357 | ** by default, gcc does not get `tmpname' | 363 | ** by default, gcc does not get `os.tmpname', because it generates a warning |
364 | ** when using `tmpname'. Change that if you really want (or do not want) | ||
365 | ** `os.tmpname' available. | ||
358 | */ | 366 | */ |
359 | #ifdef __GNUC__ | 367 | #ifdef __GNUC__ |
360 | #define USE_TMPNAME 0 | 368 | #define USE_TMPNAME 0 |
@@ -364,7 +372,11 @@ __inline int l_lrint (double flt) | |||
364 | 372 | ||
365 | 373 | ||
366 | /* | 374 | /* |
367 | ** Configuration for loadlib | 375 | ** Configuration for loadlib: Lua tries to guess the dynamic-library |
376 | ** system that your platform uses (either Windows' DLL, Mac's dyld, or | ||
377 | ** dlopen). If your system is some kind of Unix, there is a good chance | ||
378 | ** that USE_DLOPEN will work for it. You may need to adapt also the | ||
379 | ** makefile. | ||
368 | */ | 380 | */ |
369 | #if defined(_WIN32) | 381 | #if defined(_WIN32) |
370 | #define USE_DLL | 382 | #define USE_DLL |