Otclient
14/8/2020
|
#include <lua.h>
#include <lauxlib.h>
#include "lualib.h"
Go to the source code of this file.
Macros | |
#define | LUA_LIB |
#define | LUAI_INT32 int |
#define | LUA_UNSIGNED unsigned LUAI_INT32 |
#define | lua_number2unsigned(i, n) ((i)=(lua_Unsigned)(n)) |
#define | lua_unsigned2number(u) (((u) <= (lua_Unsigned)INT_MAX) ? (lua_Number)(int)(u) : (lua_Number)(u)) |
#define | LUAMOD_API LUALIB_API |
#define | LUA_BIT32LIBNAME "bit32" |
#define | luaL_newlib(x, y) luaL_register(x, LUA_BIT32LIBNAME, y) |
#define | lbitlib_c |
#define | LUA_LIB |
#define | LUA_NBITS 32 |
#define | ALLONES (~(((~(lua_Unsigned)0) << (LUA_NBITS - 1)) << 1)) |
#define | trim(x) ((x) & ALLONES) |
#define | mask(n) (~((ALLONES << 1) << ((n) - 1))) |
Typedefs | |
typedef LUA_UNSIGNED | lua_Unsigned |
typedef lua_Unsigned | b_uint |
Functions | |
int | luaopen_bit32 (lua_State *L) |
#define ALLONES (~(((~(lua_Unsigned)0) << (LUA_NBITS - 1)) << 1)) |
Definition at line 190 of file lbitlib.cpp.
#define lbitlib_c |
Definition at line 175 of file lbitlib.cpp.
#define LUA_BIT32LIBNAME "bit32" |
Definition at line 160 of file lbitlib.cpp.
#define LUA_LIB |
Definition at line 176 of file lbitlib.cpp.
#define LUA_LIB |
Definition at line 176 of file lbitlib.cpp.
#define LUA_NBITS 32 |
Definition at line 186 of file lbitlib.cpp.
#define lua_number2unsigned | ( | i, | |
n | |||
) | ((i)=(lua_Unsigned)(n)) |
Definition at line 130 of file lbitlib.cpp.
#define LUA_UNSIGNED unsigned LUAI_INT32 |
Definition at line 49 of file lbitlib.cpp.
#define lua_unsigned2number | ( | u | ) | (((u) <= (lua_Unsigned)INT_MAX) ? (lua_Number)(int)(u) : (lua_Number)(u)) |
Definition at line 136 of file lbitlib.cpp.
#define LUAI_INT32 int |
Definition at line 47 of file lbitlib.cpp.
#define luaL_newlib | ( | x, | |
y | |||
) | luaL_register(x, LUA_BIT32LIBNAME, y) |
Definition at line 161 of file lbitlib.cpp.
#define LUAMOD_API LUALIB_API |
Definition at line 159 of file lbitlib.cpp.
#define mask | ( | n | ) | (~((ALLONES << 1) << ((n) - 1))) |
Definition at line 197 of file lbitlib.cpp.
#define trim | ( | x | ) | ((x) & ALLONES) |
Definition at line 193 of file lbitlib.cpp.
typedef lua_Unsigned b_uint |
Definition at line 200 of file lbitlib.cpp.
typedef LUA_UNSIGNED lua_Unsigned |
Definition at line 85 of file lbitlib.cpp.
int luaopen_bit32 | ( | lua_State * | L | ) |