Skip to content

Commit

Permalink
Fix return type (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Sep 16, 2023
1 parent e89db0c commit b3d6b20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/python/lief/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class Section(Object):
@property
def entropy(self) -> float: ...
@property
def fullname(self) -> str: ...
def fullname(self) -> bytes: ...

class Symbol(Object):
name: object
Expand Down
5 changes: 4 additions & 1 deletion api/python/src/Abstract/pySection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ void create<Section>(nb::module_& m) {
"Section's name"_doc)

.def_prop_ro("fullname",
&Section::fullname,
[] (const Section& obj) {
const std::string& fullname = obj.fullname();
return nb::bytes(fullname.data(), fullname.size());
},
"Return the **fullname** of the section including the trailing bytes"_doc)

.def_prop_rw("size",
Expand Down

0 comments on commit b3d6b20

Please sign in to comment.