remove compile error on normal c_void_p in arg and separate localsymbol to avoid circular dep

This commit is contained in:
2025-10-24 03:08:22 +05:30
parent f18a4399ea
commit 30bcfcbbd0
4 changed files with 22 additions and 27 deletions

View File

@ -2,8 +2,7 @@ import ast
import logging
from llvmlite import ir
from dataclasses import dataclass
from typing import Any
from .local_symbol import LocalSymbol
from pythonbpf.helper import HelperHandlerRegistry
from pythonbpf.vmlinux_parser.dependency_node import Field
from .expr import VmlinuxHandlerRegistry
@ -12,18 +11,6 @@ from pythonbpf.type_deducer import ctypes_to_ir
logger = logging.getLogger(__name__)
@dataclass
class LocalSymbol:
var: ir.AllocaInstr
ir_type: ir.Type
metadata: Any = None
def __iter__(self):
yield self.var
yield self.ir_type
yield self.metadata
def create_targets_and_rvals(stmt):
"""Create lists of targets and right-hand values from an assignment statement."""
if isinstance(stmt.targets[0], ast.Tuple):