Add struct_defs_ to BpfObject

This commit is contained in:
Pragyansh Chaturvedi
2025-10-19 21:26:20 +05:30
parent 874d567825
commit b4d0a49883
2 changed files with 5 additions and 3 deletions

View File

@ -4,8 +4,9 @@
#include "bpf_program.h"
#include <cerrno>
BpfObject::BpfObject(std::string object_path)
: obj_(nullptr), object_path_(std::move(object_path)), loaded_(false) {}
BpfObject::BpfObject(std::string object_path, py::dict structs)
: obj_(nullptr), object_path_(std::move(object_path)), loaded_(false),
struct_defs_(structs) {}
BpfObject::~BpfObject() {
// Clear caches first (order matters!)