mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Avoid duplication of mod metadata in memory (#12562)
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
03428d9825
commit
f4a01f3a5d
37 changed files with 527 additions and 272 deletions
|
@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "irrlichttypes_bloated.h"
|
||||
#include "lua_api/l_base.h"
|
||||
|
||||
class Metadata;
|
||||
class IMetadata;
|
||||
|
||||
/*
|
||||
NodeMetaRef
|
||||
|
@ -38,11 +38,11 @@ protected:
|
|||
static MetaDataRef *checkobject(lua_State *L, int narg);
|
||||
|
||||
virtual void reportMetadataChange(const std::string *name = nullptr) {}
|
||||
virtual Metadata *getmeta(bool auto_create) = 0;
|
||||
virtual IMetadata *getmeta(bool auto_create) = 0;
|
||||
virtual void clearMeta() = 0;
|
||||
|
||||
virtual void handleToTable(lua_State *L, Metadata *meta);
|
||||
virtual bool handleFromTable(lua_State *L, int table, Metadata *meta);
|
||||
virtual void handleToTable(lua_State *L, IMetadata *meta);
|
||||
virtual bool handleFromTable(lua_State *L, int table, IMetadata *meta);
|
||||
|
||||
// Exported functions
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue