Add support for extensions.

This commit is contained in:
Romain Thomas
2024-07-13 07:34:36 +02:00
parent f31c8ff58d
commit b2b7fb96ec
265 changed files with 15618 additions and 56 deletions
+13
View File
@@ -17,6 +17,7 @@
#include <sstream>
#include <nanobind/stl/vector.h>
#include <nanobind/stl/string.h>
#include <nanobind/stl/unique_ptr.h>
#include "nanobind/extra/memoryview.hpp"
#include "LIEF/MachO/Binary.hpp"
@@ -55,6 +56,8 @@
#include "LIEF/MachO/UUIDCommand.hpp"
#include "LIEF/MachO/VersionMin.hpp"
#include "LIEF/ObjC/Metadata.hpp"
#include "pyErr.hpp"
#include "MachO/pyMachO.hpp"
#include "pyIterator.hpp"
@@ -663,6 +666,16 @@ void create<Binary>(nb::module_& m) {
)doc"
)
.def_prop_ro("objc_metadata", &Binary::objc_metadata,
R"doc(
Return Objective-C metadata info if present
.. warning::
This is only available with the extended version of LIEF.
)doc"_doc
)
.def("__getitem__",
nb::overload_cast<LoadCommand::TYPE>(&Binary::operator[]),
nb::rv_policy::reference_internal)