diff options
author | jinsuck <jkim@imvu.com> | 2012-12-10 09:11:06 -0800 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:22:30 +0300 |
commit | 4f143f4638aa8239ed5ae6a69a9cfa4997254572 (patch) | |
tree | 188e6dd92272b600fa459e5e9c49655942e9dd22 | |
parent | a668fe09c459f0a5691d43b81a16f09cfb9fd43a (diff) |
Revert "remove an unused method"
This reverts commit 7300ba73d3004b8d5c69bd8e3dfbc971c3147ad8.
-rw-r--r-- | src/embind/emval.js | 4 | ||||
-rw-r--r-- | system/include/emscripten/val.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/embind/emval.js b/src/embind/emval.js index eb2cae0e..e8ee6baf 100644 --- a/src/embind/emval.js +++ b/src/embind/emval.js @@ -57,6 +57,10 @@ function __emval_new_cstring(str) { return __emval_register(Pointer_stringify(str)); } +function __emval_has_property(handle, k) { + return _emval_handle_array[handle].value.hasOwnProperty(k); +} + function __emval_get_property(handle, k) { k = Pointer_stringify(k); return __emval_register(_emval_handle_array[handle].value[k]); diff --git a/system/include/emscripten/val.h b/system/include/emscripten/val.h index 91becb4f..e2d35382 100644 --- a/system/include/emscripten/val.h +++ b/system/include/emscripten/val.h @@ -84,6 +84,10 @@ namespace emscripten { return *this; } + bool exist(const char* key) const { + return internal::_emval_has_property(handle, key); + } + val get(const char* key) const { return val(internal::_emval_get_property(handle, key)); } |