X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fcomponent.py;h=9834fa8cc565dc4dc6f25595ab31a2358e6786ad;hb=b5947615bfcd6a309e1945a270f67ccc6cd2cf69;hp=afd7514a7b856101f7361c05a3c42f12eeb58ffa;hpb=056632bfab2b876e4e6149eaa3a6889ca3d28533;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/component.py b/src/bindings/python/bt2/bt2/component.py index afd7514a..9834fa8c 100644 --- a/src/bindings/python/bt2/bt2/component.py +++ b/src/bindings/python/bt2/bt2/component.py @@ -527,12 +527,15 @@ class _UserComponentType(type): results = bt2.create_value(results) if results is None: - results_addr = int(native_bt.value_null) + results_ptr = native_bt.value_null else: # return new reference - results_addr = int(results._release()) + results_ptr = results._ptr - return results_addr + # We return a new reference. + bt2.value._Value._get_ref(results_ptr) + + return int(results_ptr) def _query(cls, query_executor, obj, params, log_level): raise NotImplementedError