def _create_from_ptr_template(ptr, object_map): if ptr is None: return # bt_value_null is translated to None. However, we are given a reference # to it that we are not going to manage anymore, since we don't create a # Python wrapper for it. Therefore put that reference immediately. if ptr == native_bt.value_null: _Value._put_ref(ptr) return typeid = native_bt.value_get_type(ptr) return object_map[typeid]._create_from_ptr(ptr)
def _create_from_ptr(ptr): if ptr is None or ptr == native_bt.value_null: return typeid = native_bt.value_get_type(ptr) return _TYPE_TO_OBJ[typeid]._create_from_ptr(ptr)
def _create_from_ptr_and_get_ref_template(ptr, object_map): if ptr is None or ptr == native_bt.value_null: return typeid = native_bt.value_get_type(ptr) return object_map[typeid]._create_from_ptr_and_get_ref(ptr)
def _create_from_ptr(ptr): if ptr is None or ptr == native_bt.value_null: return typeid = native_bt.value_get_type(ptr) return _TYPE_TO_OBJ[typeid]._create_from_ptr(ptr)