Merge pull request #201 from bruvzg/ptrcall_fix_null_args
Fix passing NULL pointers as arguments via ptrcallpull/202/head
commit
8ffda12b83
|
@ -625,7 +625,7 @@ def generate_icall_implementation(icalls):
|
||||||
if is_primitive(arg) or is_core_type(arg):
|
if is_primitive(arg) or is_core_type(arg):
|
||||||
wrapped_argument += "(void *) &arg" + str(i)
|
wrapped_argument += "(void *) &arg" + str(i)
|
||||||
else:
|
else:
|
||||||
wrapped_argument += "(void *) arg" + str(i) + "->_owner"
|
wrapped_argument += "(void *) (arg" + str(i) + ") ? arg" + str(i) + "->_owner : nullptr"
|
||||||
|
|
||||||
wrapped_argument += ","
|
wrapped_argument += ","
|
||||||
source.append(wrapped_argument)
|
source.append(wrapped_argument)
|
||||||
|
|
Loading…
Reference in New Issue