diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-09-09 15:24:42 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-09-09 15:24:42 -0300 |
commit | 7fbbf1adc606fdea2432809a7133389f0db3c9c5 (patch) | |
tree | 80f3df68a059e9aa872f5d330387288c090e9877 | |
parent | 6dd3a73ca2b57b264dc1ad20e183f0efd1b9484d (diff) | |
download | lua-5.1-alpha.tar.gz lua-5.1-alpha.tar.bz2 lua-5.1-alpha.zip |
explicit macro to control use of _longjmpv5.1-alpha
-rw-r--r-- | luaconf.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.63 2005/09/02 19:53:25 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.64 2005/09/06 17:21:03 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 | */ |
@@ -235,7 +235,7 @@ | |||
235 | ** CHANGE them if you want to improve this functionality (e.g., by using | 235 | ** CHANGE them if you want to improve this functionality (e.g., by using |
236 | ** GNU readline and history facilities). | 236 | ** GNU readline and history facilities). |
237 | */ | 237 | */ |
238 | #if !defined(LUA_ANSI) && defined(LUA_USE_READLINE) | 238 | #if defined(LUA_USE_READLINE) |
239 | #include <stdio.h> | 239 | #include <stdio.h> |
240 | #include <readline/readline.h> | 240 | #include <readline/readline.h> |
241 | #include <readline/history.h> | 241 | #include <readline/history.h> |
@@ -554,8 +554,8 @@ union luai_Cast { double l_d; long l_l; }; | |||
554 | ** CHANGE them if you prefer to use longjmp/setjmp even with C++ | 554 | ** CHANGE them if you prefer to use longjmp/setjmp even with C++ |
555 | ** or if want/don't to use _longjmp/_setjmp instead of regular | 555 | ** or if want/don't to use _longjmp/_setjmp instead of regular |
556 | ** longjmp/setjmp. By default, Lua handles errors with exceptions when | 556 | ** longjmp/setjmp. By default, Lua handles errors with exceptions when |
557 | ** compiling as C++ code, with _longjmp/_setjmp when compiling as C code | 557 | ** compiling as C++ code, with _longjmp/_setjmp when asked to use them, |
558 | ** in some Unix systems, and with longjmp/setjmp otherwise. | 558 | ** and with longjmp/setjmp otherwise. |
559 | */ | 559 | */ |
560 | #if defined(__cplusplus) | 560 | #if defined(__cplusplus) |
561 | /* C++ exceptions */ | 561 | /* C++ exceptions */ |
@@ -564,7 +564,7 @@ union luai_Cast { double l_d; long l_l; }; | |||
564 | { if ((c)->status == 0) (c)->status = -1; } | 564 | { if ((c)->status == 0) (c)->status = -1; } |
565 | #define luai_jmpbuf int /* dummy variable */ | 565 | #define luai_jmpbuf int /* dummy variable */ |
566 | 566 | ||
567 | #elif !defined(LUA_ANSI) && (defined(__GLIBC__)) | 567 | #elif defined(LUA_USE_ULONGJMP) |
568 | /* in Unix, try _longjmp/_setjmp (more efficient) */ | 568 | /* in Unix, try _longjmp/_setjmp (more efficient) */ |
569 | #define LUAI_THROW(L,c) _longjmp((c)->b, 1) | 569 | #define LUAI_THROW(L,c) _longjmp((c)->b, 1) |
570 | #define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } | 570 | #define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } |