diff options
author | Chad Austin <caustin@gmail.com> | 2014-05-02 03:05:47 -0700 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2014-05-21 22:54:12 +0700 |
commit | bf85f382d15d5547197869e773288e2bc820fd86 (patch) | |
tree | 160128ad30a489bfedc7182726c495851aec050d | |
parent | 5e45a9ea3ea43d0cd58f35bc83156247f936c138 (diff) |
sketch extend method
-rw-r--r-- | system/include/emscripten/bind.h | 18 | ||||
-rw-r--r-- | tests/embind/embind.test.js | 6 |
2 files changed, 17 insertions, 7 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h index eede0755..7399bd37 100644 --- a/system/include/emscripten/bind.h +++ b/system/include/emscripten/bind.h @@ -987,6 +987,11 @@ namespace emscripten { SmartPtrIfNeeded(U&, const char*) { } }; + + template<typename PointerType, typename WrapperType> + val wrapped_extend(const val& properties) { + return val::undefined(); + } }; template<typename ClassType, typename BaseSpecifier = internal::NoBaseClass> @@ -1103,10 +1108,15 @@ namespace emscripten { ; SmartPtrIfNeeded<PointerType> _(cls, pointerName); - return class_function( - "implement", - &wrapped_new<PointerType, WrapperType, val>, - allow_raw_pointer<ret_val>()); + return + class_function( + "implement", + &wrapped_new<PointerType, WrapperType, val>, + allow_raw_pointer<ret_val>()) + .class_function( + "extend", + &wrapped_extend<PointerType, WrapperType>) + ; } template<typename ReturnType, typename... Args, typename... Policies> diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js index 1cadb7f1..523cb1bc 100644 --- a/tests/embind/embind.test.js +++ b/tests/embind/embind.test.js @@ -1640,10 +1640,10 @@ module({ }); }); - /* ENABLE THESE AS THEY PASS BaseFixture.extend("new-style class inheritance", function() { var Empty = cm.AbstractClass.extend({}); - + // ENABLE THESE AS THEY PASS +/* test("can extend, construct, and delete", function() { var instance = new Empty; instance.delete(); @@ -1713,8 +1713,8 @@ module({ assert.instanceof(instance, cm.AbstractClass); instance.delete(); }); +*/ }); - */ BaseFixture.extend("registration order", function() { test("registration of tuple elements out of order leaves them in order", function() { |