We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab71275 commit 480afd1Copy full SHA for 480afd1
1 file changed
pythonbpf/expr_pass.py
@@ -129,12 +129,14 @@ def _handle_ctypes_call(
129
return val
130
131
132
-def _get_base_type(ir_type):
+def _get_base_type_and_depth(ir_type):
133
"""Get the base type for pointer types."""
134
cur_type = ir_type
135
+ depth = 0
136
while isinstance(cur_type, ir.PointerType):
137
+ depth += 1
138
cur_type = cur_type.pointee
- return cur_type
139
+ return cur_type, depth
140
141
142
def _normalize_types(builder, lhs, rhs):
0 commit comments