资源简介
这是lua最新版源码,并提供了网页界面介绍关于lua给出的API。
代码片段和文件信息
/*
** $Id: lapi.cv 2.171.1.1 2013/04/12 18:48:47 roberto Exp $
** Lua API
** See Copyright Notice in lua.h
*/
#include
#include
#define lapi_c
#define LUA_CORE
#include “lua.h“
#include “lapi.h“
#include “ldebug.h“
#include “ldo.h“
#include “lfunc.h“
#include “lgc.h“
#include “lmem.h“
#include “lobject.h“
#include “lstate.h“
#include “lstring.h“
#include “ltable.h“
#include “ltm.h“
#include “lundump.h“
#include “lvm.h“
const char lua_ident[] =
“$LuaVersion: “ LUA_COPYRIGHT “ $“
“$LuaAuthors: “ LUA_AUTHORS “ $“;
/* value at a non-valid index */
#define NONVALIDVALUE cast(TValue * luaO_nilobject)
/* corresponding test */
#define isvalid(o) ((o) != luaO_nilobject)
/* test for pseudo index */
#define ispseudo(i) ((i) <= LUA_REGISTRYINDEX)
/* test for valid but not pseudo index */
#define isstackindex(i o) (isvalid(o) && !ispseudo(i))
#define api_checkvalidindex(L o) api_check(L isvalid(o) “invalid index“)
#define api_checkstackindex(L i o) \
api_check(L isstackindex(i o) “index not in the stack“)
static TValue *index2addr (lua_State *L int idx) {
CallInfo *ci = L->ci;
if (idx > 0) {
TValue *o = ci->func + idx;
api_check(L idx <= ci->top - (ci->func + 1) “unacceptable index“);
if (o >= L->top) return NONVALIDVALUE;
else return o;
}
else if (!ispseudo(idx)) { /* negative index */
api_check(L idx != 0 && -idx <= L->top - (ci->func + 1) “invalid index“);
return L->top + idx;
}
else if (idx == LUA_REGISTRYINDEX)
return &G(L)->l_registry;
else { /* upvalues */
idx = LUA_REGISTRYINDEX - idx;
api_check(L idx <= MAXUPVAL + 1 “upvalue index too large“);
if (ttislcf(ci->func)) /* light C function? */
return NONVALIDVALUE; /* it has no upvalues */
else {
CClosure *func = clCvalue(ci->func);
return (idx <= func->nupvalues) ? &func->upvalue[idx-1] : NONVALIDVALUE;
}
}
}
/*
** to be called by ‘lua_checkstack‘ in protected mode to grow stack
** capturing memory errors
*/
static void growstack (lua_State *L void *ud) {
int size = *(int *)ud;
luaD_growstack(L size);
}
LUA_API int lua_checkstack (lua_State *L int size) {
int res;
CallInfo *ci = L->ci;
lua_lock(L);
if (L->stack_last - L->top > size) /* stack large enough? */
res = 1; /* yes; check is OK */
else { /* no; need to grow stack */
int inuse = cast_int(L->top - L->stack) + EXTRA_STACK;
if (inuse > LUAI_MAXSTACK - size) /* can grow without overflow? */
res = 0; /* no */
else /* try to grow stack */
res = (luaD_rawrunprotected(L &growstack &size) == LUA_OK);
}
if (res && ci->top < L->top + size)
ci->top = L->top + size; /* adjust frame top */
lua_unlock(L);
return res;
}
LUA_API void lua_xmove (lua_State *from lua_State *to int n) {
int i;
if (from == to) return;
lua_lock(to);
api_checknelems(from n);
api_check(from G(from) == G(to) “moving among independent states“);
api_ch
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-11-10 08:49 lua-5.2.3\
目录 0 2013-11-10 08:58 lua-5.2.3\doc\
文件 25014 2013-03-12 22:22 lua-5.2.3\doc\contents.html
文件 4232 2001-10-23 20:39 lua-5.2.3\doc\logo.gif
文件 2204 2011-11-17 01:16 lua-5.2.3\doc\lua.1
文件 1491 2013-11-10 08:56 lua-5.2.3\doc\lua.css
文件 3071 2011-11-17 01:16 lua-5.2.3\doc\luac.1
文件 414 2013-11-10 08:45 lua-5.2.3\doc\manual.css
文件 306305 2013-03-21 23:59 lua-5.2.3\doc\manual.html
文件 3774 2006-11-17 03:39 lua-5.2.3\doc\osi-certified-72x60.png
文件 12847 2013-11-10 08:39 lua-5.2.3\doc\readme.html
文件 3274 2013-11-10 08:49 lua-5.2.3\Makefile
文件 151 2013-11-10 08:49 lua-5.2.3\README
目录 0 2013-11-11 19:46 lua-5.2.3\src\
文件 29910 2013-04-13 02:48 lua-5.2.3\src\lapi.c
文件 545 2013-04-13 02:48 lua-5.2.3\src\lapi.h
文件 27541 2013-04-13 02:48 lua-5.2.3\src\lauxlib.c
文件 7344 2013-04-13 02:48 lua-5.2.3\src\lauxlib.h
文件 12285 2013-04-13 02:48 lua-5.2.3\src\lba
文件 4374 2013-07-10 02:01 lua-5.2.3\src\lbitlib.c
文件 22404 2013-04-13 02:48 lua-5.2.3\src\lcode.c
文件 3120 2013-04-13 02:48 lua-5.2.3\src\lcode.h
文件 3575 2013-04-13 02:48 lua-5.2.3\src\lcorolib.c
文件 2299 2013-04-13 02:48 lua-5.2.3\src\lctype.c
文件 1841 2013-04-13 02:48 lua-5.2.3\src\lctype.h
文件 10081 2013-04-13 02:48 lua-5.2.3\src\ldblib.c
文件 16088 2013-05-17 00:04 lua-5.2.3\src\ldebug.c
文件 1087 2013-04-13 02:48 lua-5.2.3\src\ldebug.h
文件 20751 2013-11-09 02:22 lua-5.2.3\src\ldo.c
文件 1531 2013-04-13 02:48 lua-5.2.3\src\ldo.h
文件 3221 2013-04-13 02:48 lua-5.2.3\src\ldump.c
............此处省略43个文件信息
- 上一篇:关于颜色滤波阵列的资料
- 下一篇:树莓派智能家居开题报告
相关资源
- 触摸精灵lua脚本更新源码
- LuaInterface资源包
- xlua+unity单机版捕鱼视频教程+源码
- lua5.3解释器
- wireshark lua 插件 解析提取网络报文传
- luac逆向工具
- windows7下Lua的编译,使用Visual Studio
- Lua 5.1 for delphi 2010-XE4
- lua脚本语言零基础开发教程
- Risk-Neutral Valuation-Pricing and Hedging of
- Evaluation.zip
- ManageEngine_Patch_Manager_Plus_64bitStandardE
- Research on Real-time Forecasting and Evaluati
- Study on the Technical Economics Evaluation Mo
- EVALUATION OF ENVIRONMENTAL IMPACT OF TYPICAL
- EVALUATION OF ENVIRONMENTAL IMPACT OF TYPICAL
- BIODEGRADABILITY EVALUATION OF TYPICAL LEATHER
- EVALUATION OF ENVIRONMENTAL IMPACT OF TYPICAL
- Biodegradability Evaluation of Typical Leather
- Evaluation of Genetic Diversity of 48 Potato O
- EmmyLua-AttachDebugger-1.0.0.4.zip
- LuacGUI反编译工具
- cocos lua 搓牌
- tolua++-1.0.92源码
- PowerDesigner165_Evaluation_pdflm16破击文件
- Lua-5.3.5_Win32_bin
- Cocos2d-x实战 Lua卷 PDF电子书 带书签目
- LuaEditor软件,可以编辑,可以调试
- 可直接替换M26的GPRS模块Air208M
- BabeLua For VS2017 V3.2.2.0.vsix 亲测 可用
评论
共有 条评论