Remove integer keys from lush table, use string lookups (issue #29)
VM now resolves lush functions via luaH_getshortstr through interned TString pointers, so wrapping lush.command = my_wrapper is transparently picked up. The lush table no longer has integer-keyed duplicates.
This commit is contained in:
3
lcmd.h
3
lcmd.h
@@ -8,6 +8,7 @@
|
||||
#define lcmd_h
|
||||
|
||||
#include "lua.h"
|
||||
#include "lobject.h"
|
||||
|
||||
/* OP_LUSH sub-operation indices (B operand selects which function) */
|
||||
#define LUSH_OP_COMMAND 0
|
||||
@@ -23,6 +24,8 @@ int lushCmd_getenv (lua_State *L);
|
||||
int lushCmd_setenv (lua_State *L);
|
||||
int lushCmd_subcmd (lua_State *L);
|
||||
|
||||
extern TString *lushname[];
|
||||
|
||||
LUAMOD_API int luaopen_lush (lua_State *L);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user