aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rwxr-xr-xsystem/include/emscripten/bind.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h
index bbce9a93..652fb1b4 100755
--- a/system/include/emscripten/bind.h
+++ b/system/include/emscripten/bind.h
@@ -96,7 +96,6 @@ namespace emscripten {
void _embind_register_smart_ptr(
TYPEID pointerType,
TYPEID pointeeType,
- bool isPolymorphic,
const char* pointerName,
GenericFunction constructor,
GenericFunction destructor,
@@ -322,12 +321,12 @@ namespace emscripten {
);
}
- template<typename PointerType>
- void nullDeallocator(PointerType* p) {}
+// template<typename PointerType>
+// void nullDeallocator(PointerType* p) {}
template<typename PointerType>
- typename std::shared_ptr<PointerType> raw_smart_pointer_constructor(PointerType *ptr, void (PointerType*)) {
- return std::shared_ptr<PointerType>(ptr, nullDeallocator<PointerType>);
+ typename std::shared_ptr<PointerType> raw_smart_pointer_constructor(PointerType *ptr, std::shared_ptr<PointerType> basePtr, void (PointerType*)) {
+ return std::shared_ptr<PointerType>(basePtr, ptr);
}
template<typename ClassType>
@@ -620,7 +619,6 @@ namespace emscripten {
_embind_register_smart_ptr(
TypeID<PointerType>::get(),
TypeID<PointeeType>::get(),
- std::is_polymorphic<PointeeType>::value,
name,
reinterpret_cast<GenericFunction>(&raw_smart_pointer_constructor<PointeeType*>),
reinterpret_cast<GenericFunction>(&raw_destructor<PointerType>),