diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-17 10:50:20 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-17 10:50:20 -0200 |
| commit | 46f1429936ff7cde274f9896d022ab494567ee7a (patch) | |
| tree | 9fdba8a4b51ca29e1cb91088b4db8e461a9c6426 | |
| parent | e0f9d1c8f5cca74d1ad4017a1f14ff1acac2075a (diff) | |
| download | lua-46f1429936ff7cde274f9896d022ab494567ee7a.tar.gz lua-46f1429936ff7cde274f9896d022ab494567ee7a.tar.bz2 lua-46f1429936ff7cde274f9896d022ab494567ee7a.zip | |
more options moved from luaconf.h into internal files
| -rw-r--r-- | llimits.h | 34 | ||||
| -rw-r--r-- | lstrlib.c | 20 | ||||
| -rw-r--r-- | luaconf.h | 35 |
3 files changed, 53 insertions, 36 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llimits.h,v 1.75 2009/11/17 11:56:03 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.76 2009/12/17 12:26:09 roberto Exp roberto $ |
| 3 | ** Limits, basic types, and some other `installation-dependent' definitions | 3 | ** Limits, basic types, and some other `installation-dependent' definitions |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -134,6 +134,38 @@ typedef lu_int32 Instruction; | |||
| 134 | 134 | ||
| 135 | 135 | ||
| 136 | /* | 136 | /* |
| 137 | ** these macros allow user-specific actions on threads when you defined | ||
| 138 | ** LUAI_EXTRASPACE and need to do something extra when a thread is | ||
| 139 | ** created/deleted/resumed/yielded. | ||
| 140 | */ | ||
| 141 | #if !defined(luai_userstateopen) | ||
| 142 | #define luai_userstateopen(L) ((void)L) | ||
| 143 | #endif | ||
| 144 | |||
| 145 | #if !defined(luai_userstateclose) | ||
| 146 | #define luai_userstateclose(L) ((void)L) | ||
| 147 | #endif | ||
| 148 | |||
| 149 | #if !defined(luai_userstatethread) | ||
| 150 | #define luai_userstatethread(L,L1) ((void)L) | ||
| 151 | #endif | ||
| 152 | |||
| 153 | #if !defined(luai_userstatefree) | ||
| 154 | #define luai_userstatefree(L) ((void)L) | ||
| 155 | #endif | ||
| 156 | |||
| 157 | #if !defined(luai_userstateresume) | ||
| 158 | #define luai_userstateresume(L,n) ((void)L) | ||
| 159 | #endif | ||
| 160 | |||
| 161 | #if !defined(luai_userstateyield) | ||
| 162 | #define luai_userstateyield(L,n) ((void)L) | ||
| 163 | #endif | ||
| 164 | |||
| 165 | |||
| 166 | |||
| 167 | |||
| 168 | /* | ||
| 137 | ** macro to control inclusion of some hard tests on stack reallocation | 169 | ** macro to control inclusion of some hard tests on stack reallocation |
| 138 | */ | 170 | */ |
| 139 | #if !defined(HARDSTACKTESTS) | 171 | #if !defined(HARDSTACKTESTS) |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.145 2009/11/26 16:49:28 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.146 2009/12/17 12:26:09 roberto Exp roberto $ |
| 3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -698,6 +698,24 @@ static int str_gsub (lua_State *L) { | |||
| 698 | /* }====================================================== */ | 698 | /* }====================================================== */ |
| 699 | 699 | ||
| 700 | 700 | ||
| 701 | /* | ||
| 702 | ** length modifier for integer conversions ** in 'string.format' and | ||
| 703 | ** integer type corresponding to the previous length | ||
| 704 | */ | ||
| 705 | |||
| 706 | #if defined(LUA_USELONGLONG) | ||
| 707 | |||
| 708 | #define LUA_INTFRMLEN "ll" | ||
| 709 | #define LUA_INTFRM_T long long | ||
| 710 | |||
| 711 | #else | ||
| 712 | |||
| 713 | #define LUA_INTFRMLEN "l" | ||
| 714 | #define LUA_INTFRM_T long | ||
| 715 | |||
| 716 | #endif | ||
| 717 | |||
| 718 | |||
| 701 | /* maximum size of each formatted item (> len(format('%99.99f', -1e308))) */ | 719 | /* maximum size of each formatted item (> len(format('%99.99f', -1e308))) */ |
| 702 | #define MAX_ITEM 512 | 720 | #define MAX_ITEM 512 |
| 703 | /* valid flags in a format specification */ | 721 | /* valid flags in a format specification */ |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.121 2009/12/14 15:27:30 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.122 2009/12/17 12:26:09 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 | */ |
| @@ -524,39 +524,6 @@ union luai_Cast { double l_d; long l_l; }; | |||
| 524 | #endif | 524 | #endif |
| 525 | 525 | ||
| 526 | 526 | ||
| 527 | /* | ||
| 528 | @@ luai_userstate* allow user-specific actions on threads. | ||
| 529 | ** CHANGE them if you defined LUAI_EXTRASPACE and need to do something | ||
| 530 | ** extra when a thread is created/deleted/resumed/yielded. | ||
| 531 | */ | ||
| 532 | #define luai_userstateopen(L) ((void)L) | ||
| 533 | #define luai_userstateclose(L) ((void)L) | ||
| 534 | #define luai_userstatethread(L,L1) ((void)L) | ||
| 535 | #define luai_userstatefree(L) ((void)L) | ||
| 536 | #define luai_userstateresume(L,n) ((void)L) | ||
| 537 | #define luai_userstateyield(L,n) ((void)L) | ||
| 538 | |||
| 539 | |||
| 540 | /* | ||
| 541 | @@ LUA_INTFRMLEN is the length modifier for integer conversions | ||
| 542 | @* in 'string.format'. | ||
| 543 | @@ LUA_INTFRM_T is the integer type corresponding to the previous length | ||
| 544 | @* modifier. | ||
| 545 | ** CHANGE them if your system supports long long or does not support long. | ||
| 546 | */ | ||
| 547 | |||
| 548 | #if defined(LUA_USELONGLONG) | ||
| 549 | |||
| 550 | #define LUA_INTFRMLEN "ll" | ||
| 551 | #define LUA_INTFRM_T long long | ||
| 552 | |||
| 553 | #else | ||
| 554 | |||
| 555 | #define LUA_INTFRMLEN "l" | ||
| 556 | #define LUA_INTFRM_T long | ||
| 557 | |||
| 558 | #endif | ||
| 559 | |||
| 560 | 527 | ||
| 561 | 528 | ||
| 562 | /* =================================================================== */ | 529 | /* =================================================================== */ |
