mirror of
https://github.com/lief-project/LIEF
synced 2026-06-08 15:30:44 +00:00
Refactor some parts of the Architecture:
* JSON visitor are located in the format namespace * Visitor are *real* visitor * Visitable class has been renamed to Object * Due to a bug in Visual Studio 2015, we move to VS2017
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include "pyELF.hpp"
|
||||
|
||||
#include "LIEF/ELF/DynamicEntry.hpp"
|
||||
#include "LIEF/visitors/Hash.hpp"
|
||||
#include "LIEF/ELF/hash.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
@@ -30,7 +30,7 @@ using setter_t = void (DynamicEntry::*)(T);
|
||||
void init_ELF_DynamicEntry_class(py::module& m) {
|
||||
|
||||
// DynamicEntry object
|
||||
py::class_<DynamicEntry>(m, "DynamicEntry")
|
||||
py::class_<DynamicEntry, LIEF::Object>(m, "DynamicEntry")
|
||||
.def(py::init<>(),
|
||||
"Default constructor")
|
||||
|
||||
@@ -48,17 +48,11 @@ void init_ELF_DynamicEntry_class(py::module& m) {
|
||||
static_cast<setter_t<uint64_t>>(&DynamicEntry::value),
|
||||
"Return the entry's value.")
|
||||
|
||||
.def_property("name",
|
||||
static_cast<getter_t<const std::string&>>(&DynamicEntry::name),
|
||||
static_cast<setter_t<const std::string&>>(&DynamicEntry::name),
|
||||
"Depending on the entry type, it return a name. For instance for a ``DT_SONAME``\
|
||||
entry it returns the library name")
|
||||
|
||||
.def("__eq__", &DynamicEntry::operator==)
|
||||
.def("__ne__", &DynamicEntry::operator!=)
|
||||
.def("__hash__",
|
||||
[] (const DynamicEntry& entry) {
|
||||
return LIEF::Hash::hash(entry);
|
||||
return Hash::hash(entry);
|
||||
})
|
||||
|
||||
.def("__str__",
|
||||
|
||||
Reference in New Issue
Block a user