diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-11 13:59:38 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-11 13:59:38 -0800 |
commit | 15903fda75b5392df886b512bae8b8d74fafc61f (patch) | |
tree | 706c4efa4f551fe96b5d167ea2c4e333736b2cb5 /src/wasm.h | |
parent | 6002ab916590ef634edeb306a14846913a4e626a (diff) | |
download | binaryen-15903fda75b5392df886b512bae8b8d74fafc61f.tar.gz binaryen-15903fda75b5392df886b512bae8b8d74fafc61f.tar.bz2 binaryen-15903fda75b5392df886b512bae8b8d74fafc61f.zip |
don't allow direct access to the vectors on the Module object
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm.h b/src/wasm.h index 63b861174..9dc140efe 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -924,20 +924,20 @@ public: }; class Module { -public: - // wasm contents + // wasm contents (don't access these from outside; use add*() and the *Map objects) std::vector<FunctionType*> functionTypes; std::vector<Import*> imports; std::vector<Export*> exports; - Table table; std::vector<Function*> functions; +public: // utility maps std::map<Name, FunctionType*> functionTypesMap; std::map<Name, Import*> importsMap; std::map<Name, Export*> exportsMap; std::map<Name, Function*> functionsMap; + Table table; Memory memory; Module() : functionTypeIndex(0), importIndex(0), exportIndex(0), functionIndex(0) {} |