Skip to content

Commit

Permalink
Python: mark add_entry return value as reference
Browse files Browse the repository at this point in the history
Makes the return value from the PE::Reference add_entry method an
internal reference.
  • Loading branch information
mikenawrocki authored and romainthomas committed Sep 19, 2024
1 parent 5c1f361 commit 8d64197
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/python/src/PE/objects/pyRelocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ void create<Relocation>(nb::module_& m) {
.def("add_entry",
&Relocation::add_entry,
"Add a new " RST_CLASS_REF(lief.PE.RelocationEntry) ""_doc,
"new_entry"_a)
"new_entry"_a,
nb::rv_policy::reference_internal)

LIEF_COPYABLE(Relocation)
LIEF_DEFAULT_STR(Relocation);
Expand Down

0 comments on commit 8d64197

Please sign in to comment.