diff options
author | Chad Austin <chad@imvu.com> | 2013-07-17 11:49:17 -0700 |
---|---|---|
committer | Chad Austin <chad@imvu.com> | 2013-07-17 11:50:17 -0700 |
commit | b911d5d6e3d75acc1e790c7ac834de7403d18a1d (patch) | |
tree | d39cf1f65c568149850b911974a18e71c47f5589 /tests/embind/embind_test.cpp | |
parent | 3952582ab33d25419f12c45c37358ea12487ef63 (diff) |
Add a test that shows JS objects can be modified if passed by reference into a C++ function
Diffstat (limited to 'tests/embind/embind_test.cpp')
-rw-r--r-- | tests/embind/embind_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp index 419c216e..d6b27bce 100644 --- a/tests/embind/embind_test.cpp +++ b/tests/embind/embind_test.cpp @@ -2235,3 +2235,11 @@ EMSCRIPTEN_BINDINGS(with_adjustment) { function("return_Base_from_DerivedWithOffset", &return_Base_from_DerivedWithOffset); } + +void clear_StringHolder(StringHolder& sh) { + sh.set(""); +} + +EMSCRIPTEN_BINDINGS(references) { + function("clear_StringHolder", &clear_StringHolder); +} |