diff options
author | George Hazan <ghazan@miranda.im> | 2017-09-13 12:55:10 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-09-13 12:55:10 +0300 |
commit | d290e446d4ddde8dd789bdaa2bff64b453a61af2 (patch) | |
tree | 07c2cae71148822171b153d09600d650f8b57d27 /plugins/MirLua | |
parent | d719b8064934970c80da2a9dbc341177bb876e70 (diff) |
compilation fix
Diffstat (limited to 'plugins/MirLua')
-rw-r--r-- | plugins/MirLua/src/mlua_metatable.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h index ddd67090d0..20b64446cf 100644 --- a/plugins/MirLua/src/mlua_metatable.h +++ b/plugins/MirLua/src/mlua_metatable.h @@ -29,7 +29,12 @@ struct MTField class CMTField
{
+ ptrA pszName;
+
public:
+ const char* GetName() const { return pszName; }
+ void SetName(const char *szName) { pszName = mir_strdup(szName); }
+
virtual MTField GetValue(void *obj) = 0;
virtual ~CMTField(){};
};
@@ -40,6 +45,7 @@ class CMTFieldOffset : public CMTField int lua_type;
ptrdiff_t offset;
size_t size;
+
public:
CMTFieldOffset(ptrdiff_t off, size_t s, int type) : offset(off), lua_type(type), size(s) {}
virtual MTField GetValue(void *obj)
@@ -58,7 +64,7 @@ public: CMTFieldFunction(lua_CFunction f) : func(f) {}
- virtual MTField GetValue(void *obj)
+ virtual MTField GetValue(void*)
{
MTField tmp = { LUA_TFUNCTION };
tmp.val.function = func;
@@ -90,7 +96,7 @@ private: lua_State *L;
static const char *name;
- static std::map<std::string, CMTField*> fields;
+ static OBJLIST<CMTField> arFields;
static T* Init(lua_State *L)
{
|