资源简介
这是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
- grpc-lua CentOS 7.4 执行程序打包
- 用lua写一份阴历阳历互转
- Synthesis and biological evaluation of cytotox
- Luaplus 53 Vs2015编译 通过 附使用说明
- LuaStudio7.23 完美破解版本
- Evaluation Quality of the Elderly‘s Living E
- Programming_in_Lua_4th_ed._(2017)_.pdf
- 现在最新版本lua,lua-5.2.3。
- lua-sha2-0.2.0.tar.gz
- Lua语言编程 中文版
- 《Programming in Lua》中文版
- lua程序设计第一版+第四版
- lua源码欣赏--云风 高清pdf
- Lua Programming Gems 英文版 pdf,高清
- luaide 免费版 0.3.7
- Lua Programming Gems 高清书签
- Programming in Lua(4th) 无水印pdf
- pc6-vcredist_x86
- luadec解密工具 包含了5.1、5.2、5.3版本
- program in lua 中文版
- air202 mqtt 测试程序
- XILINX开发板ZC706指导手册 Evaluation Bo
- 饥荒mod教程---输入
- Information Retrieval: Implementing and Evalua
- lua游戏ai开发指南 源码
- BabeLua For 2019 V3.2.2.0.zip
- Lua学习游戏AI编程.zip
- 最新天龙LUA
- FundamentalsofUltrasonicNondestructiveEvaluati
评论
共有 条评论