diff options
Diffstat (limited to 'luaconf.h')
| -rw-r--r-- | luaconf.h | 51 |
1 files changed, 1 insertions, 50 deletions
| @@ -321,31 +321,6 @@ | |||
| 321 | #define LUALIB_API LUA_API | 321 | #define LUALIB_API LUA_API |
| 322 | #define LUAMOD_API LUA_API | 322 | #define LUAMOD_API LUA_API |
| 323 | 323 | ||
| 324 | |||
| 325 | /* | ||
| 326 | @@ LUAI_FUNC is a mark for all extern functions that are not to be | ||
| 327 | ** exported to outside modules. | ||
| 328 | @@ LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables, | ||
| 329 | ** none of which to be exported to outside modules (LUAI_DDEF for | ||
| 330 | ** definitions and LUAI_DDEC for declarations). | ||
| 331 | ** CHANGE them if you need to mark them in some special way. Elf/gcc | ||
| 332 | ** (versions 3.2 and later) mark them as "hidden" to optimize access | ||
| 333 | ** when Lua is compiled as a shared library. Not all elf targets support | ||
| 334 | ** this attribute. Unfortunately, gcc does not offer a way to check | ||
| 335 | ** whether the target offers that support, and those without support | ||
| 336 | ** give a warning about it. To avoid these warnings, change to the | ||
| 337 | ** default definition. | ||
| 338 | */ | ||
| 339 | #if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ | ||
| 340 | defined(__ELF__) /* { */ | ||
| 341 | #define LUAI_FUNC __attribute__((visibility("internal"))) extern | ||
| 342 | #else /* }{ */ | ||
| 343 | #define LUAI_FUNC extern | ||
| 344 | #endif /* } */ | ||
| 345 | |||
| 346 | #define LUAI_DDEC(dec) LUAI_FUNC dec | ||
| 347 | #define LUAI_DDEF /* empty */ | ||
| 348 | |||
| 349 | /* }================================================================== */ | 324 | /* }================================================================== */ |
| 350 | 325 | ||
| 351 | 326 | ||
| @@ -415,26 +390,11 @@ | |||
| 415 | */ | 390 | */ |
| 416 | 391 | ||
| 417 | 392 | ||
| 418 | /* The following definitions are good for most cases here */ | 393 | /* The following definition is good for most cases here */ |
| 419 | 394 | ||
| 420 | #define l_floor(x) (l_mathop(floor)(x)) | 395 | #define l_floor(x) (l_mathop(floor)(x)) |
| 421 | 396 | ||
| 422 | 397 | ||
| 423 | /* | ||
| 424 | @@ lua_numbertointeger converts a float number with an integral value | ||
| 425 | ** to an integer, or returns 0 if float is not within the range of | ||
| 426 | ** a lua_Integer. (The range comparisons are tricky because of | ||
| 427 | ** rounding. The tests here assume a two-complement representation, | ||
| 428 | ** where MININTEGER always has an exact representation as a float; | ||
| 429 | ** MAXINTEGER may not have one, and therefore its conversion to float | ||
| 430 | ** may have an ill-defined value.) | ||
| 431 | */ | ||
| 432 | #define lua_numbertointeger(n,p) \ | ||
| 433 | ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ | ||
| 434 | (n) < -(LUA_NUMBER)(LUA_MININTEGER) && \ | ||
| 435 | (*(p) = (LUA_INTEGER)(n), 1)) | ||
| 436 | |||
| 437 | |||
| 438 | /* now the variable definitions */ | 398 | /* now the variable definitions */ |
| 439 | 399 | ||
| 440 | #if LUA_FLOAT_TYPE == LUA_FLOAT_FLOAT /* { single float */ | 400 | #if LUA_FLOAT_TYPE == LUA_FLOAT_FLOAT /* { single float */ |
| @@ -694,13 +654,6 @@ | |||
| 694 | #endif | 654 | #endif |
| 695 | 655 | ||
| 696 | 656 | ||
| 697 | #if defined(LUA_CORE) || defined(LUA_LIB) | ||
| 698 | /* shorter names for Lua's own use */ | ||
| 699 | #define l_likely(x) luai_likely(x) | ||
| 700 | #define l_unlikely(x) luai_unlikely(x) | ||
| 701 | #endif | ||
| 702 | |||
| 703 | |||
| 704 | 657 | ||
| 705 | /* }================================================================== */ | 658 | /* }================================================================== */ |
| 706 | 659 | ||
| @@ -782,7 +735,5 @@ | |||
| 782 | 735 | ||
| 783 | 736 | ||
| 784 | 737 | ||
| 785 | |||
| 786 | |||
| 787 | #endif | 738 | #endif |
| 788 | 739 | ||
