mirror of
https://github.com/QuasarApp/LIEF.git
synced 2025-04-28 13:24:32 +00:00
Resolve #455
This commit is contained in:
parent
4881c6f5c4
commit
5f26216f90
@ -324,7 +324,8 @@ void create<Binary>(py::module& m) {
|
||||
|
||||
.def("replace",
|
||||
static_cast<Segment& (Binary::*)(const Segment&, const Segment&, uint64_t)>(&Binary::replace),
|
||||
"Replace the segment given in 2nd parameter with the segment given in the first one and return the updated segment",
|
||||
"Replace the segment given in 2nd parameter with the segment given in the first one and return the updated segment."
|
||||
".. warning:: The ``original_segment`` is no longer valid after this function\n\n",
|
||||
"new_segment"_a, "original_segment"_a, "base"_a = 0,
|
||||
py::return_value_policy::reference)
|
||||
|
||||
|
@ -349,6 +349,9 @@ class LIEF_API Binary : public LIEF::Binary {
|
||||
//! @return The segment added. `Virtual address` and `File Offset` may have changed
|
||||
Segment& add(const Segment& segment, uint64_t base = 0);
|
||||
|
||||
//! Replace the segment given in 2nd parameter with the segment given in the first one and return the updated segment.
|
||||
//!
|
||||
//! @warning .The ``original_segment`` is no longer valid after this function
|
||||
Segment& replace(const Segment& new_segment, const Segment& original_segment, uint64_t base = 0);
|
||||
|
||||
Segment& extend(const Segment& segment, uint64_t size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user