From bfd0179042b0b02fb88748d54e56e7e208bb117f Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Wed, 2 Apr 2014 20:46:06 +0200 Subject: Revert "Update lua plugin to 5.2.3" FILE typedef to *void needs more work to not break sim and application builds. I checked only a few random native builds unfortunately. Sorry for inconvenience. --- apps/plugins/lua/ltable.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'apps/plugins/lua/ltable.h') diff --git a/apps/plugins/lua/ltable.h b/apps/plugins/lua/ltable.h index d69449b2b8..aa28914871 100644 --- a/apps/plugins/lua/ltable.h +++ b/apps/plugins/lua/ltable.h @@ -1,5 +1,5 @@ /* -** $Id: ltable.h,v 2.16.1.2 2013/08/30 15:49:41 roberto Exp $ +** $Id$ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -11,25 +11,20 @@ #define gnode(t,i) (&(t)->node[i]) -#define gkey(n) (&(n)->i_key.tvk) +#define gkey(n) (&(n)->i_key.nk) #define gval(n) (&(n)->i_val) #define gnext(n) ((n)->i_key.nk.next) -#define invalidateTMcache(t) ((t)->flags = 0) +#define key2tval(n) (&(n)->i_key.tvk) -/* returns the key, given the value of a table entry */ -#define keyfromval(v) \ - (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val)))) - -LUAI_FUNC const TValue *luaH_getint (Table *t, int key); -LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value); +LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); +LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); +LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); -LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); -LUAI_FUNC Table *luaH_new (lua_State *L); -LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize); +LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); LUAI_FUNC void luaH_free (lua_State *L, Table *t); LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); -- cgit v1.2.3