#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lctype.h"
#include "ldebug.h"
#include "ldo.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "lvm.h"
#include <math.h>
Go to the source code of this file.
Macros | |
#define | lobject_c |
#define | LUA_CORE |
#define | LL(x) (sizeof(x)/sizeof(char) - 1) |
#define | RETS "..." |
#define | PRE "[string \"" |
#define | POS "\"]" |
#define | addstr(a, b, l) ( memcpy(a,b,(l) * sizeof(char)), a += (l) ) |
Functions | |
int | luaO_int2fb (unsigned int x) |
int | luaO_fb2int (int x) |
int | luaO_ceillog2 (unsigned int x) |
lua_Number | luaO_arith (int op, lua_Number v1, lua_Number v2) |
int | luaO_hexavalue (int c) |
static int | isneg (const char **s) |
static lua_Number | readhexa (const char **s, lua_Number r, int *count) |
static lua_Number | lua_strx2number (const char *s, char **endptr) |
int | luaO_str2d (const char *s, size_t len, lua_Number *result) |
static void | pushstr (lua_State *L, const char *str, size_t l) |
const char * | luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) |
const char * | luaO_pushfstring (lua_State *L, const char *fmt,...) |
void | luaO_chunkid (char *out, const char *source, size_t bufflen) |
Variables | |
LUAI_DDEF const TValue | luaO_nilobject_ = {NILCONSTANT} |
Definition at line 249 of file lobject.cpp.
Referenced by luaO_chunkid().
Definition at line 243 of file lobject.cpp.
Referenced by luaO_chunkid().
#define lobject_c |
Definition at line 11 of file lobject.cpp.
#define LUA_CORE |
Definition at line 12 of file lobject.cpp.
#define POS "\"]" |
Definition at line 247 of file lobject.cpp.
Referenced by luaO_chunkid().
#define PRE "[string \"" |
Definition at line 246 of file lobject.cpp.
Referenced by luaO_chunkid().
#define RETS "..." |
Definition at line 245 of file lobject.cpp.
Referenced by luaO_chunkid().
|
static |
Definition at line 97 of file lobject.cpp.
Referenced by lua_strx2number().
|
static |
Definition at line 117 of file lobject.cpp.
References cast, cast_uchar, e, exp1(), i, isneg(), l_mathop, lisdigit, lisspace, and readhexa().
Referenced by luaO_str2d().
lua_Number luaO_arith | ( | int | op, |
lua_Number | v1, | ||
lua_Number | v2 | ||
) |
Definition at line 72 of file lobject.cpp.
References lua_assert, LUA_OPADD, LUA_OPDIV, LUA_OPMOD, LUA_OPMUL, LUA_OPPOW, LUA_OPSUB, and LUA_OPUNM.
Referenced by constfolding(), lua_arith(), and luaV_arith().
Definition at line 54 of file lobject.cpp.
Referenced by countint(), and setnodevector().
void luaO_chunkid | ( | char * | out, |
const char * | source, | ||
size_t | bufflen | ||
) |
Definition at line 251 of file lobject.cpp.
References addstr, LL, POS, PRE, and RETS.
Referenced by addinfo(), funcinfo(), and lexerror().
Definition at line 86 of file lobject.cpp.
References lisdigit, and ltolower.
Referenced by readhexa(), and readhexaesc().
const char* luaO_pushfstring | ( | lua_State * | L, |
const char * | fmt, | ||
... | |||
) |
Definition at line 232 of file lobject.cpp.
References luaO_pushvfstring(), and game_logic::msg().
Referenced by addinfo(), check_match(), checkmode(), checkrepeated(), closegoto(), error(), error_expected(), errorlimit(), GCTM(), lexerror(), luaX_token2str(), txtToken(), and undefgoto().
const char* luaO_pushvfstring | ( | lua_State * | L, |
const char * | fmt, | ||
va_list | argp | ||
) |
Definition at line 178 of file lobject.cpp.
References cast, cast_num, e, LUA_QL, luaD_checkstack, luaG_runerror(), luaV_concat(), pushstr(), setnvalue, svalue, and lua_State::top.
Referenced by lua_pushfstring(), lua_pushvfstring(), luaG_runerror(), and luaO_pushfstring().
int luaO_str2d | ( | const char * | s, |
size_t | len, | ||
lua_Number * | result | ||
) |
Definition at line 157 of file lobject.cpp.
References cast_uchar, lisspace, lua_str2number, and lua_strx2number().
Referenced by luaV_tonumber().
Definition at line 172 of file lobject.cpp.
References luaS_newlstr(), setsvalue2s, and lua_State::top.
Referenced by luaO_pushvfstring().
|
static |
Definition at line 104 of file lobject.cpp.
References cast_num, cast_uchar, lisxdigit, and luaO_hexavalue().
Referenced by lua_strx2number().
LUAI_DDEF const TValue luaO_nilobject_ = {NILCONSTANT} |
Definition at line 27 of file lobject.cpp.