Fix includes for BpfObject

This commit is contained in:
Pragyansh Chaturvedi
2025-10-20 06:08:36 +05:30
parent 8cc8f4267a
commit 867f142a7f
2 changed files with 10 additions and 10 deletions

View File

@ -1,9 +1,10 @@
#include "bpf_object.h" #include "core/bpf_object.h"
#include "bpf_exception.h" #include "core/bpf_exception.h"
#include "bpf_map.h" #include "core/bpf_map.h"
#include "bpf_program.h" #include "core/bpf_program.h"
#include "utils/struct_parser.h" #include "utils/struct_parser.h"
#include <cerrno> #include <cerrno>
#include <cstring>
#include <utility> #include <utility>
BpfObject::BpfObject(std::string object_path, py::dict structs) BpfObject::BpfObject(std::string object_path, py::dict structs)
@ -263,9 +264,9 @@ py::dict BpfObject::get_cached_maps() const {
} }
std::shared_ptr<StructParser> BpfObject::get_struct_parser() const { std::shared_ptr<StructParser> BpfObject::get_struct_parser() const {
if (!struct_parser_ && !struct_defs_.empty()) { if (!struct_parser_ && !struct_defs_.empty()) {
// Create parser on first access // Create parser on first access
struct_parser_ = std::make_shared<StructParser>(struct_defs_); struct_parser_ = std::make_shared<StructParser>(struct_defs_);
} }
return struct_parser_; return struct_parser_;
} }

View File

@ -6,7 +6,6 @@
#include <pybind11/pybind11.h> #include <pybind11/pybind11.h>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include <vector>
namespace py = pybind11; namespace py = pybind11;