| 1039 | } |
| 1040 | |
| 1041 | char * |
| 1042 | get_table_str(lua_State *L, const char *name) |
| 1043 | { |
| 1044 | char *ret; |
| 1045 | |
| 1046 | lua_getfield(L, -1, name); |
| 1047 | ret = dupstr(luaL_checkstring(L, -1)); |
| 1048 | lua_pop(L, 1); |
| 1049 | return ret; |
| 1050 | } |
| 1051 | |
| 1052 | /* get optional string value from table. |
| 1053 | return value must be freed by caller. */ |
no test coverage detected