diff options
author | Chad Austin <chad@imvu.com> | 2013-04-16 18:46:47 -0700 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-18 20:08:19 +0300 |
commit | a76d9ceaee0a83c0af562753ad5efd01858c1c8b (patch) | |
tree | c14656d727b59bbd89c849467f65c5973075ccfe /tests/embind | |
parent | e5c04828c4c2eaec83cf25b83067064db2270c2e (diff) |
switch to EMSCRIPTEN_SYMBOL which improves code size a bit by storing the pointer to the string literal as a constant as opposed to a global variable.
Diffstat (limited to 'tests/embind')
-rw-r--r-- | tests/embind/embind_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp index 9bab2872..04771dbe 100644 --- a/tests/embind/embind_test.cpp +++ b/tests/embind/embind_test.cpp @@ -1087,7 +1087,7 @@ public: }
};
-symbol optionalMethodSymbol = "optionalMethod";
+EMSCRIPTEN_SYMBOL(optionalMethod);
class AbstractClassWrapper : public wrapper<AbstractClass> {
public:
@@ -1097,7 +1097,7 @@ public: return call<std::string>("abstractMethod");
}
std::string optionalMethod(std::string s) const {
- return optional_call<std::string>(optionalMethodSymbol, [&] {
+ return optional_call<std::string>(optionalMethod_symbol, [&] {
return AbstractClass::optionalMethod(s);
}, s);
}
|