Skip to content

Commit

Permalink
libdrgn: python: replace return no_cleanup_ptr() with return_ptr()
Browse files Browse the repository at this point in the history
They're equivalent, but return_ptr() is preferred.

Fixes: 085b0bc ("libdrgn: add DRGN_OBJECT scope guard")
Signed-off-by: Omar Sandoval <[email protected]>
  • Loading branch information
osandov committed Nov 17, 2023
1 parent fedad60 commit f910504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libdrgn/python/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static PyObject *DrgnObject_compound_value(struct drgn_object *obj,
return NULL;
}
}
return no_cleanup_ptr(dict);
return_ptr(dict);
}

static PyObject *DrgnObject_array_value(struct drgn_object *obj,
Expand Down Expand Up @@ -624,7 +624,7 @@ static PyObject *DrgnObject_array_value(struct drgn_object *obj,
return NULL;
PyList_SET_ITEM(list, i, element_value);
}
return no_cleanup_ptr(list);
return_ptr(list);
}

static PyObject *DrgnObject_value_impl(struct drgn_object *obj)
Expand Down

0 comments on commit f910504

Please sign in to comment.