mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-12-06 18:08:36 +00:00
Core: Return the function-pointer check directly in _is_flattenable_scalar
Style only, no behaviour change and no IR change. Keeps `ruff check --select SIM` clean on the files this branch touches. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -58,9 +58,10 @@ def _is_flattenable_scalar(member_type: Any) -> bool:
|
||||
return False
|
||||
if issubclass(member_type, (ctypes._Pointer, ctypes.Array)):
|
||||
return False
|
||||
if hasattr(member_type, "_restype_") and hasattr(member_type, "_argtypes_"):
|
||||
return False
|
||||
return True
|
||||
is_function_pointer = hasattr(member_type, "_restype_") and hasattr(
|
||||
member_type, "_argtypes_"
|
||||
)
|
||||
return not is_function_pointer
|
||||
|
||||
|
||||
def flatten_anonymous_members(class_obj, dep_node) -> None:
|
||||
|
||||
Reference in New Issue
Block a user