MCPcopy Create free account
hub / github.com/danomatika/ofxLua / tableSize

Method tableSize

src/ofxLua.cpp:681–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679}
680
681unsigned int ofxLua::tableSize() {
682 if(!isValid()) {
683 return 0;
684 }
685
686 if(tables.empty()) {
687 ofLogWarning("ofxLua") << "Couldn't get table size, no open tables";
688 return 0;
689 }
690
691 if(!lua_istable(L, LUA_STACK_TOP)) {
692 ofLogWarning("ofxLua") << "Couldn't get table size, stack var is not a table";
693 return 0;
694 }
695
696 return lua_rawlen(L, LUA_STACK_TOP);
697}
698
699unsigned int ofxLua::tableSize(const std::string& tableName) {
700 unsigned int size = 0;

Callers 1

runTestsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected