Use cache for the iOS ci and improve testing

This commit is contained in:
Romain Thomas
2023-07-15 06:34:59 +02:00
parent 4b29b87c14
commit 9fecc8301a
23 changed files with 434 additions and 45 deletions
+10 -2
View File
@@ -19,6 +19,7 @@
#include <nanobind/stl/unique_ptr.h>
#include <nanobind/stl/string.h>
#include <nanobind/stl/vector.h>
#include "nanobind/extra/memoryview.hpp"
#include "ELF/pyELF.hpp"
@@ -692,8 +693,15 @@ void create<Binary>(nb::module_& m) {
"True if data are appended to the end of the binary"_doc)
.def_prop_rw("overlay",
nb::overload_cast<>(&Binary::overlay, nb::const_),
nb::overload_cast<Binary::overlay_t>(&Binary::overlay),
[] (const Binary& self) {
const span<const uint8_t> overlay = self.overlay();
return nb::memoryview::from_memory(overlay.data(), overlay.size());
},
[] (Binary& self, nb::bytes& bytes) {
const auto* ptr = reinterpret_cast<const uint8_t*>(bytes.c_str());
std::vector<uint8_t> buffer(ptr, ptr + bytes.size());
self.overlay(std::move(buffer));
},
"Overlay data that are not a part of the ELF format"_doc)
.def("relocate_phdr_table",