diff options
-rw-r--r-- | system/include/emscripten/bind.h | 6 | ||||
-rw-r--r-- | tests/embind/embind_test.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h index 2562a301..681d79d0 100644 --- a/system/include/emscripten/bind.h +++ b/system/include/emscripten/bind.h @@ -690,7 +690,7 @@ namespace emscripten { return 0; // no sharing } - static PointerType* operator_new() { + static PointerType* construct_null() { return new PointerType; } }; @@ -724,7 +724,7 @@ namespace emscripten { val_deleter(val::take_ownership(v))); } - static PointerType* operator_new() { + static PointerType* construct_null() { return new PointerType; } @@ -888,7 +888,7 @@ namespace emscripten { typeid(PointerType).name(), PointerTrait::get_sharing_policy(), reinterpret_cast<GenericFunction>(&PointerTrait::get), - reinterpret_cast<GenericFunction>(&PointerTrait::operator_new), + reinterpret_cast<GenericFunction>(&PointerTrait::construct_null), reinterpret_cast<GenericFunction>(&PointerTrait::share), reinterpret_cast<GenericFunction>(&raw_destructor<PointerType>)); return *this; diff --git a/tests/embind/embind_test.cpp b/tests/embind/embind_test.cpp index 401b2734..4cf12615 100644 --- a/tests/embind/embind_test.cpp +++ b/tests/embind/embind_test.cpp @@ -1299,8 +1299,8 @@ namespace emscripten { return CustomSmartPtr<T>(ptr); } - static pointer_type* operator_new() { - return new pointer_type(); + static pointer_type* construct_null() { + return new pointer_type; } }; } |