get optional integer value from table */
| 1026 | |
| 1027 | /* get optional integer value from table */ |
| 1028 | int |
| 1029 | get_table_int_opt(lua_State *L, const char *name, int defval) |
| 1030 | { |
| 1031 | int ret = defval; |
| 1032 | |
| 1033 | lua_getfield(L, -1, name); |
| 1034 | if (!lua_isnil(L, -1)) { |
| 1035 | ret = (int) luaL_checkinteger(L, -1); |
| 1036 | } |
| 1037 | lua_pop(L, 1); |
| 1038 | return ret; |
| 1039 | } |
| 1040 | |
| 1041 | char * |
| 1042 | get_table_str(lua_State *L, const char *name) |
no outgoing calls
no test coverage detected