MCPcopy Create free account
hub / github.com/DFHack/dfhack / get_xlsxreader_handle

Function get_xlsxreader_handle

plugins/xlsxreader.cpp:88–94  ·  view source on GitHub ↗

internal function to extract a handle from the first stack param

Source from the content-addressed store, hash-verified

86
87// internal function to extract a handle from the first stack param
88static void * get_xlsxreader_handle(lua_State *L) {
89 if (lua_gettop(L) < 1 || lua_isnil(L, 1)) {
90 luaL_error(L, "invalid xlsxreader handle");
91 }
92 luaL_checktype(L, 1, LUA_TUSERDATA);
93 return LuaWrapper::get_object_ref(L, 1);
94}
95
96// takes a file handle and returns a table-list of sheet names
97int list_sheets(lua_State *L) {

Callers 2

list_sheetsFunction · 0.85
get_rowFunction · 0.85

Calls 3

lua_gettopFunction · 0.85
luaL_errorFunction · 0.85
luaL_checktypeFunction · 0.85

Tested by

no test coverage detected