Merge pull request #201 from bruvzg/ptrcall_fix_null_args

Fix passing NULL pointers as arguments via ptrcall
pull/202/head
Bastiaan Olij 2018-11-22 21:29:44 +11:00 committed by GitHub
commit 8ffda12b83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -625,7 +625,7 @@ def generate_icall_implementation(icalls):
if is_primitive(arg) or is_core_type(arg):
wrapped_argument += "(void *) &arg" + str(i)
else:
wrapped_argument += "(void *) arg" + str(i) + "->_owner"
wrapped_argument += "(void *) (arg" + str(i) + ") ? arg" + str(i) + "->_owner : nullptr"
wrapped_argument += ","
source.append(wrapped_argument)