fix return value error

This commit is contained in:
2025-10-03 19:11:11 +05:30
parent 6d5d6345e2
commit 3f061750cf
2 changed files with 7 additions and 5 deletions

View File

@ -0,0 +1,20 @@
import logging
from pythonbpf import compile, bpf, section, bpfglobal, compile_to_ir
from ctypes import c_void_p, c_int64
@bpf
@section("sometag1")
def sometag(ctx: c_void_p) -> c_int64:
a = 1 - 1
return c_int64(a)
@bpf
@bpfglobal
def LICENSE() -> str:
return "GPL"
compile_to_ir("var_rval.py", "var_rval.ll")
compile(loglevel=logging.INFO)