cls._bt_cc_ptr = cc_ptr
- def _bt_init_from_native(cls, comp_ptr, params_ptr):
+ def _bt_init_from_native(cls, comp_ptr, params_ptr, obj):
# create instance, not user-initialized yet
self = cls.__new__(cls)
else:
params = None
- self.__init__(params)
+ self.__init__(params, obj)
return self
def __call__(cls, *args, **kwargs):
if hasattr(cls, '_bt_cc_ptr'):
cc_ptr = cls._bt_as_component_class_ptr(cls._bt_cc_ptr)
native_bt.component_class_put_ref(cc_ptr)
+ native_bt.bt2_unregister_cc_ptr_to_py_cls(cc_ptr)
# Subclasses must provide these methods or property:
def addr(self):
return int(self._bt_ptr)
- def __init__(self, params=None):
+ def __init__(self, params=None, obj=None):
pass
def _user_finalize(self):