axe.lue Online Documentation

BlitzMax Forums/BlitzMax Beginners Area/axe.lue Online Documentation

Rozek(Posted 2007) [#1]
Hello again!

As the axe.lua module lacks some documentation, I just compiled a list of Lua API functions together with links to the official online Lua Reference Manual.

If this turns out to be useful, I could easily provide a similar list for the axe.lua module itself.

Lua API

lua_atpanic:byte ptr (lua_state:byte ptr, panicf:int(ls:byte ptr))
lua_call (lua_state:byte ptr, nargs:int, nresults:int)
lua_checkstack:int (lua_state:byte ptr, extra:int)
lua_close (lua_state:byte ptr)
lua_concat (lua_state:byte ptr, n:int)
lua_cpcall:int (lua_state:byte ptr, func:int(ls:byte ptr), ud:byte ptr)
lua_createtable (lua_state:byte ptr, narr:int, nrec:int)
lua_dump:int (lua_state:byte ptr, writer:int(ls:byte ptr,p:byte ptr,sz:int,ud:byte ptr), data:byte ptr)
lua_equal:int (lua_state:byte ptr, index1:int, index2:int)
lua_error:int (lua_state:byte ptr)
lua_gc:int (lua_state:byte ptr, what:int, data:int)
lua_getallocf:byte ptr (lua_state:byte ptr, ud:byte ptr ptr)
lua_getfenv (lua_state:byte ptr, index:int)
lua_getfield (lua_state:byte ptr, index:int, k$z)
lua_getglobal (lua_state:byte ptr, name:string)
lua_gethook:byte ptr (lua_state:byte ptr)
lua_gethookcount:int (lua_state:byte ptr)
lua_gethookmask:int (lua_state:byte ptr)
lua_getinfo:int (lua_state:byte ptr, what$z, ar:lua_Debug ptr)
lua_getlocal$z (lua_state:byte ptr, ar:lua_Debug ptr, n:int)
lua_getmetatable:int (lua_state:byte ptr, index:int)
lua_getstack:int (lua_state:byte ptr, level:int, ar:lua_Debug ptr)
lua_gettable (lua_state:byte ptr, index:int)
lua_gettop:int (lua_state:byte ptr)
lua_getupvalue$z (lua_state:byte ptr, funcindex:int, n:int)
lua_insert (lua_state:byte ptr, index:int)
lua_isboolean:int (lua_state:byte ptr, index:int)
lua_iscfunction:int (lua_state:byte ptr, index:int)
lua_isfunction:int (lua_state:byte ptr, index:int)
lua_islightuserdata:int (lua_state:byte ptr, index:int)
lua_isnil:int (lua_state:byte ptr, index:int)
lua_isnone:int (lua_state:byte ptr, index:int)
lua_isnoneornil:int (lua_state:byte ptr, index:int)
lua_isnumber:int (lua_state:byte ptr, index:int)
lua_isstring:int (lua_state:byte ptr, index:int)
lua_istable:int (lua_state:byte ptr, index:int)
lua_isthread:int (lua_state:byte ptr, index:int)
lua_isuserdata:int (lua_state:byte ptr, index:int)
lua_lessthan:int (lua_state:byte ptr, index1:int, index2:int)
lua_load:int (lua_state:byte ptr, reader:byte ptr(ls:byte ptr,data:byte ptr,sz:int ptr), data:byte ptr, chunkname$z)
lua_newstate:byte ptr (f:byte ptr(ud:byte ptr, p:byte ptr, osize:int, nsize:int), ud:byte ptr)
lua_newtable (lua_state:byte ptr)
lua_newthread:byte ptr (lua_state:byte ptr)
lua_newuserdata:byte ptr (lua_state:byte ptr, size:int)
lua_next:int (lua_state:byte ptr, index:int)
lua_objlen:int (lua_state:byte ptr, index:int)
lua_pcall:int (lua_state:byte ptr, nargs:int, nresults:int, errfunc:int)
lua_pop (lua_state:byte ptr, n:int)
lua_pushboolean (lua_state:byte ptr, b:int)
lua_pushcclosure (lua_state:byte ptr, fn:int(ls:byte ptr), n:int)
lua_pushcfunction (lua_state:byte ptr, fn:int(ls:byte ptr))
lua_pushinteger (lua_state:byte ptr, n:long)
lua_pushlightuserdata (lua_state:byte ptr, p:byte ptr)
lua_pushlstring (lua_state:byte ptr, s:byte ptr, size:int)
lua_pushnil (lua_state:byte ptr)
lua_pushnumber (lua_state:byte ptr, n:double)
lua_pushstring (lua_state:byte ptr, s$z)
lua_pushthread:int (lua_state:byte ptr)
lua_pushvalue (lua_state:byte ptr, index:int)
lua_rawequal:int (lua_state:byte ptr, index1:int, index2:int)
lua_rawget (lua_state:byte ptr, index:int)
lua_rawgeti (lua_state:byte ptr, index:int, n:int)
lua_rawset (lua_state:byte ptr, index:int)
lua_rawseti (lua_state:byte ptr, index:int, n:int)
lua_register (lua_state:byte ptr, name:string, f:int(ls:byte ptr))
lua_remove (lua_state:byte ptr, index:int)
lua_replace (lua_state:byte ptr, index:int)
lua_resume:int (lua_state:byte ptr, narg:int)
lua_setallocf (lua_state:byte ptr, f:byte ptr(ud:byte ptr, p:byte ptr, osize:int, nsize:int), ud:byte ptr)
lua_setfenv:int (lua_state:byte ptr, index:int)
lua_setfield (lua_state:byte ptr, index:int, k$z)
lua_setglobal (lua_state:byte ptr, name:string)
lua_sethook:int (lua_state:byte ptr, f(ls:byte ptr,ar:lua_Debug ptr), mask:int, count:int)
lua_setlocal$z (lua_state:byte ptr, ar:lua_Debug ptr, n:int)
lua_setmetatable:int (lua_state:byte ptr, index:int)
lua_settable (lua_state:byte ptr, index:int)
lua_settop (lua_state:byte ptr, index:int)
lua_setupvalue$z (lua_state:byte ptr, funcindex:int, n:int)
lua_status:int (lua_state:byte ptr)
lua_toboolean:int (lua_state:byte ptr, index:int)
lua_tocfunction:byte ptr (lua_state:byte ptr, index:int)
lua_tointeger:long (lua_state:byte ptr, index:int)
lua_tolstring:byte ptr (lua_state:byte ptr, index:int, size:int ptr)
lua_tonumber:double (lua_state:byte ptr, index:int)
lua_topointer:byte ptr (lua_state:byte ptr, index:int)
lua_tostring:string (lua_state:byte ptr, index:int)
lua_tothread:byte ptr (lua_state:byte ptr, index:int)
lua_touserdata:byte ptr (lua_state:byte ptr, index:int)
lua_type:int (lua_state:byte ptr, index:int)
lua_typename$z (lua_state:byte ptr, tp:int)
lua_xmove (fromState:byte ptr, toState:byte ptr, n:int)
lua_yield:int (lua_state:byte ptr, nresults:int)

Lua Auxiliary Library API

luaL_addchar (B:byte ptr, c:string)
luaL_addlstring (B:byte ptr, s:byte ptr, l:int)
luaL_addsize (B:byte ptr, size:int)
luaL_addstring (B:byte ptr, s$z)
luaL_addvalue (B:byte ptr)
luaL_argcheck (lua_state:byte ptr, cond:int, narg:int, extramsg:string)
luaL_argerror:int (lua_state:byte ptr, narg:int, extramsg$z)
luaL_buffinit (lua_state:byte ptr, B:byte ptr)
luaL_callmeta:int (lua_state:byte ptr, obj:int, e$z)
luaL_checkany (lua_state:byte ptr, narg:int)
luaL_checkint:int (lua_state:byte ptr, narg:int)
luaL_checkinteger:long (lua_state:byte ptr, narg:int)
luaL_checklong:long (lua_state:byte ptr, narg:int)
luaL_checklstring:byte ptr (lua_state:byte ptr, narg:int, size:int ptr)
luaL_checknumber:double (lua_state:byte ptr, narg:int)
luaL_checkstack (lua_state:byte ptr, sz:int, msg$z)
luaL_checkstring:string (lua_state:byte ptr, narg:int)
luaL_checktype (lua_state:byte ptr, narg:int, t:int)
luaL_checkudata:byte ptr (lua_state:byte ptr, narg:int, tname$z)
luaL_dofile:int (lua_state:byte ptr, filename:string)
luaL_dostring:int (lua_state:byte ptr, str:string)
luaL_getmetafield:int (lua_state:byte ptr, obj:int, e$z)
luaL_getmetatable (lua_state:byte ptr, tname:string)
luaL_gsub$z (lua_state:byte ptr, s$z, p$z, r$z)
luaL_loadbuffer:int (lua_state:byte ptr, buff:byte ptr, sz:int, name$z)
luaL_loadfile:int (lua_state:byte ptr, filename$z)
luaL_loadstring:int (lua_state:byte ptr, s$z)
luaL_newmetatable:int (lua_state:byte ptr, tname$z)
luaL_newstate:byte ptr ()
luaL_openlibs (lua_state:byte ptr)
luaL_optint:int (lua_state:byte ptr, narg:int, d:int)
luaL_optinteger:long (lua_state:byte ptr, narg:int, d:long)
luaL_optlong:long (lua_state:byte ptr, narg:int, d:long)
luaL_optlstring:byte ptr (lua_state:byte ptr, narg:int, d$z, size:int ptr)
luaL_optnumber:double (lua_state:byte ptr, narg:int, d:double)
luaL_optstring:string (lua_state:byte ptr, narg:int, d:string)
luaL_prepbuffer:byte ptr (B:byte ptr)
luaL_pushresult (B:byte ptr)
luaL_ref:int (lua_state:byte ptr, t:int)
luaL_register (lua_state:byte ptr, libname$z, l:lua_Reg ptr)
luaL_typename:string (lua_state:byte ptr, idx:int)
luaL_typerror:int (lua_state:byte ptr, narg:int, tname$z)
luaL_unref (lua_state:byte ptr, t:int, ref:int)
luaL_where (lua_state:byte ptr, lvl:int)


Rozek(Posted 2007) [#2]
Hmmm,

it seems as if I would still be somewhat tired: could please anybody change the topic of this thread: "lua" instead of "lue"!

Thanks!


Rozek(Posted 2007) [#3]
Another remark:

the function signatures shown above have been taken from a (not yet officially available) axe.lua module version 1.23 which contains a whole bunch of modifications I've added myself in order to become Lua 5.1.2-compliant and to fix several bugs.

Hopefully, Simon "skidracer" will find some time to look at it and publish it on BRL's server soon...

Until then, you'll have to download and compile it yourself:

http://www.Andreas-Rozek.de/BlitzMax/lua.mod.zip

contains everything you need.


Rozek(Posted 2007) [#4]
Ok, done,

my "personal" modification of axe.lua now also contains some documentation which refers to the Lua Reference Manual which comes with axe.lua itself.

Thus, you won't need any Internet access just for the documentation.

The BMX source itself and a ZIP archive containing everything you need to (re)build the axe.lua module can be found at

http://www.Andreas-Rozek.de/BlitzMax/lua.bmx
http://www.Andreas-Rozek.de/BlitzMax/lua.mod.zip

By the way: it seems as if the code which generates the documentation from a BlitzMax source simply copies the line which specifies a given function - including any trailing comment (if that exists). In this case, such a behaviour might be useful as it adds some relevant information to the docs, but in general that might be considered as a bug...