aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2014-05-02 13:52:01 -0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2014-05-21 22:54:21 +0700
commita1a062d915d244cdbd681cf6eb4a0ca71a8c8a67 (patch)
tree15b052ab7054a343ac0c950ae001c51895e7f0e2 /system
parentbf85f382d15d5547197869e773288e2bc820fd86 (diff)
can extend, construct, and delete
Diffstat (limited to 'system')
-rw-r--r--system/include/emscripten/bind.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h
index 7399bd37..a0545f3f 100644
--- a/system/include/emscripten/bind.h
+++ b/system/include/emscripten/bind.h
@@ -172,6 +172,10 @@ namespace emscripten {
GenericFunction invoker,
GenericFunction method);
+ EM_VAL _embind_create_inheriting_constructor(
+ const char* constructorName,
+ TYPEID wrapperType);
+
void _embind_register_enum(
TYPEID enumType,
const char* name,
@@ -988,9 +992,11 @@ namespace emscripten {
}
};
- template<typename PointerType, typename WrapperType>
- val wrapped_extend(const val& properties) {
- return val::undefined();
+ template<typename WrapperType>
+ val wrapped_extend(const std::string& name, const val& properties) {
+ return val::take_ownership(_embind_create_inheriting_constructor(
+ name.c_str(),
+ TypeID<WrapperType>::get()));
}
};
@@ -1115,7 +1121,7 @@ namespace emscripten {
allow_raw_pointer<ret_val>())
.class_function(
"extend",
- &wrapped_extend<PointerType, WrapperType>)
+ &wrapped_extend<WrapperType>)
;
}