mirror of
https://github.com/lief-project/LIEF
synced 2026-06-08 15:30:44 +00:00
Resolve #119 and enhance ELF Python bindings
This commit is contained in:
@@ -22,13 +22,13 @@
|
||||
void init_LIEF_Parser_class(py::module& m) {
|
||||
|
||||
m.def("parse",
|
||||
static_cast<LIEF::Binary* (*) (const std::string&)>(&LIEF::Parser::parse),
|
||||
static_cast<std::unique_ptr<LIEF::Binary> (*) (const std::string&)>(&LIEF::Parser::parse),
|
||||
"Parse the given binary and return a " RST_CLASS_REF(lief.Binary) " object",
|
||||
"filepath"_a,
|
||||
py::return_value_policy::take_ownership);
|
||||
|
||||
m.def("parse",
|
||||
static_cast<LIEF::Binary* (*) (const std::vector<uint8_t>&, const std::string&)>(&LIEF::Parser::parse),
|
||||
static_cast<std::unique_ptr<LIEF::Binary> (*) (const std::vector<uint8_t>&, const std::string&)>(&LIEF::Parser::parse),
|
||||
"Parse the given binary and return a " RST_CLASS_REF(lief.Binary) " object",
|
||||
"raw"_a, "name"_a = "",
|
||||
py::return_value_policy::take_ownership);
|
||||
|
||||
Reference in New Issue
Block a user