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:
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "pyELF.hpp"
|
||||
|
||||
#include "LIEF/visitors/Hash.hpp"
|
||||
#include "LIEF/ELF/hash.hpp"
|
||||
#include "LIEF/ELF/Note.hpp"
|
||||
|
||||
template<class T>
|
||||
@@ -29,7 +29,7 @@ using setter_t = void (Note::*)(T);
|
||||
|
||||
void init_ELF_Note_class(py::module& m) {
|
||||
|
||||
py::class_<Note>(m, "Note")
|
||||
py::class_<Note, LIEF::Object>(m, "Note")
|
||||
.def(py::init<>(),
|
||||
"Default ctor")
|
||||
|
||||
@@ -44,8 +44,8 @@ void init_ELF_Note_class(py::module& m) {
|
||||
)
|
||||
|
||||
.def_property("type",
|
||||
static_cast<getter_t<uint32_t>>(&Note::type),
|
||||
static_cast<setter_t<uint32_t>>(&Note::type),
|
||||
static_cast<getter_t<NOTE_TYPES>>(&Note::type),
|
||||
static_cast<setter_t<NOTE_TYPES>>(&Note::type),
|
||||
"Return the type of the note. Can be one of the " RST_CLASS_REF(lief.ELF.NOTE_TYPES) " values"
|
||||
)
|
||||
|
||||
@@ -69,7 +69,7 @@ void init_ELF_Note_class(py::module& m) {
|
||||
.def("__ne__", &Note::operator!=)
|
||||
.def("__hash__",
|
||||
[] (const Note& note) {
|
||||
return LIEF::Hash::hash(note);
|
||||
return Hash::hash(note);
|
||||
})
|
||||
|
||||
.def("__str__",
|
||||
|
||||
Reference in New Issue
Block a user