diff options
author | Ophir LOJKINE <pere.jobs@gmail.com> | 2014-05-19 23:21:21 +0200 |
---|---|---|
committer | Ophir LOJKINE <pere.jobs@gmail.com> | 2014-05-19 23:21:21 +0200 |
commit | ea01df8b734fb59c8dd435b3c3a7c0aa77a9b08f (patch) | |
tree | bbb0594d17fa7e6d9fd435dff33608465164923d /tests/embind/embind_test.cpp | |
parent | ba00e71ac68819df214fdfc57dda71c5bb58e887 (diff) | |
parent | f681994208ed73f7642e5658ba9482c1743f0f35 (diff) |
Merge remote-tracking branch 'upstream/incoming' into fast-cwrap
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 5a83903a..52103bbb 100644 --- a/tests/embind/embind_test.cpp +++ b/tests/embind/embind_test.cpp @@ -2368,3 +2368,11 @@ EMSCRIPTEN_BINDINGS(val_new_) { function("construct_with_memory_view", &construct_with_memory_view); function("construct_with_ints_and_float", &construct_with_ints_and_float); } + +std::string getTypeOfVal(const val& v) { + return v.typeof().as<std::string>(); +} + +EMSCRIPTEN_BINDINGS(typeof) { + function("getTypeOfVal", &getTypeOfVal); +} |