diff --git a/src/core/bpf_map.cpp b/src/core/bpf_map.cpp index 2c00ed4..81f4526 100644 --- a/src/core/bpf_map.cpp +++ b/src/core/bpf_map.cpp @@ -1,6 +1,7 @@ #include "core/bpf_map.h" #include "core/bpf_exception.h" #include "core/bpf_object.h" +#include "utils/struct_parser.h" #include #include #include @@ -233,7 +234,7 @@ void BpfMap::python_to_bytes_inplace(const py::object &obj, } } -py::object BpfMap::bytes_to_python(std::span data) { +py::object BpfMap::bytes_to_python(std::span data) const { // NOTE: Struct parsing for value type if (struct_parser_ && !value_struct_name_.empty()) { py::bytes py_data(reinterpret_cast(data.data()), data.size()); diff --git a/src/core/bpf_map.h b/src/core/bpf_map.h index 94bc551..3aa45e3 100644 --- a/src/core/bpf_map.h +++ b/src/core/bpf_map.h @@ -79,7 +79,7 @@ public: private: static void python_to_bytes_inplace(const py::object &obj, std::span buffer); - static py::object bytes_to_python(std::span data); + py::object bytes_to_python(std::span data) const; }; #endif // PYLIBBPF_BPF_MAP_H