summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
authorAndrew Lamoureux <andrew@vector35.com>2022-01-16 11:26:09 -0500
committerAndrew Lamoureux <andrew@vector35.com>2022-01-16 11:26:09 -0500
commite621ce147bac7fefd1823986eb2acbccd29897d6 (patch)
treeb3537e757cc85be885fd3a2bfc0ad09f957beaf4 /python/types.py
parentc1f9d616a327f8992d470859899eef27f591a396 (diff)
Fix ArrayBuilder, PointerBuilder in python/types.py
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/types.py b/python/types.py
index 160d78f9..b88b2022 100644
--- a/python/types.py
+++ b/python/types.py
@@ -820,7 +820,7 @@ class PointerBuilder(TypeBuilder):
_const = BoolWithConfidence.get_core_struct(const)
_volatile = BoolWithConfidence.get_core_struct(volatile)
- handle = core.BNCreatePointerTypeBuilderOfWidth(_width, type.handle, _const,
+ handle = core.BNCreatePointerTypeBuilderOfWidth(_width, type._to_core_struct(), _const,
_volatile, ref_type)
assert handle is not None, "BNCreatePointerTypeBuilderOfWidth returned None"
return cls(handle, platform, confidence)
@@ -838,7 +838,7 @@ class ArrayBuilder(TypeBuilder):
@classmethod
def create(cls, type:SomeType, element_count:int,
platform:'_platform.Platform'=None, confidence:int=core.max_confidence) -> 'ArrayBuilder':
- handle = core.BNCreateArrayTypeBuilder(type.handle, element_count)
+ handle = core.BNCreateArrayTypeBuilder(type._to_core_struct(), element_count)
assert handle is not None, "BNCreateArrayTypeBuilder returned None"
return cls(handle, platform, confidence)
@@ -868,7 +868,7 @@ class FunctionBuilder(TypeBuilder):
conv_conf.confidence = calling_convention.confidence
vararg_conf = BoolWithConfidence.get_core_struct(var_args)
- stack_adjust_conf = SizeWithConfidence.get_core_struct(stack_adjust)
+ stack_adjust_conf = OffsetWithConfidence.get_core_struct(stack_adjust)
handle = core.BNCreateFunctionTypeBuilder(ret_conf, conv_conf, param_buf, len(params),
vararg_conf, stack_adjust_conf)