forked from ceu-lang/ceu-sdl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
lua.ceu
82 lines (73 loc) · 1.72 KB
/
lua.ceu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef _LUA_CEU
#define _LUA_CEU
native do
/******/
#ifdef __ANDROID__
##include "lua.h"
##include "lauxlib.h"
#else
##include <lua5.1/lua.h>
##include <lua5.1/lauxlib.h>
#endif
/*
int ceu_lua_atpanic (lua_State* lua) {
#ifdef CEU_DEBUG
#ifdef __ANDROID__
printf("LUA_ATPANIC: %s\n", lua_tostring(lua,-1));
#else
//fprintf(stderr, "LUA_ATPANIC on %d: %s\n",
//CEU.lst.lbl, lua_tostring(lua,-1));
fprintf(stderr, "LUA_ATPANIC: %s\n",
lua_tostring(lua,-1));
#endif
#endif
return 0;
}
*/
/******/
end
native _lua_State = 0;
native @const _LUA_NOREF, _LUA_REGISTRYINDEX, _LUA_TSTRING;
native @nohold _ceu_lua_atpanic();
native @nohold
_lua_atpanic(),
_lua_call(),
_lua_close(),
_lua_getfield(),
_lua_getglobal(),
_lua_gettop(),
_lua_isnil(),
_lua_newtable(),
_lua_objlen(),
_lua_pop(),
_lua_pushboolean(),
_lua_pushlightuserdata(),
_lua_pushnil(),
_lua_pushnumber(),
_lua_pushstring(),
_lua_pushvalue(),
_lua_rawget(),
_lua_rawgeti(),
_lua_rawseti(),
_lua_remove(),
_lua_setglobal(),
_lua_settop(),
_lua_toboolean(),
_lua_tointeger(),
_lua_tonumber(),
_lua_topointer(),
_lua_tostring(),
_lua_touserdata(),
_lua_type();
native @nohold
_luaL_dofile(),
_luaL_dostring(),
_luaL_loadfile(),
_luaL_loadstring(),
_luaL_newstate(),
_luaL_openlibs(),
_luaL_optint(),
_luaL_optnumber(),
_luaL_unref();
native @nohold _luaL_ref(); // TODO: should be hold
#endif