Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make it so passing a string type object will lead to a null being pas…
…sed.
  • Loading branch information
jnthn committed Nov 24, 2011
1 parent 497c48b commit 896015d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ops/nqp_dyncall.ops
Expand Up @@ -335,7 +335,7 @@ inline op nqp_native_call(out PMC, in PMC, in PMC, in PMC) :base_core {
case DYNCALL_ARG_ASCIISTR:
case DYNCALL_ARG_UTF8STR:
case DYNCALL_ARG_UTF16STR:
{
if (IS_CONCRETE(value)) {
char *str = Parrot_str_to_encoded_cstring(interp,
REPR(value)->get_str(interp, STABLE(value), OBJECT_BODY(value)),
body->arg_types[i] == DYNCALL_ARG_ASCIISTR ? Parrot_ascii_encoding_ptr :
Expand All @@ -349,6 +349,9 @@ inline op nqp_native_call(out PMC, in PMC, in PMC, in PMC) :base_core {
num_strs++;
}
}
else {
dcArgPointer(vm, NULL);
}
break;
case DYNCALL_ARG_CSTRUCT:
case DYNCALL_ARG_PACKEDARRAY:
Expand Down Expand Up @@ -387,6 +390,7 @@ inline op nqp_native_call(out PMC, in PMC, in PMC, in PMC) :base_core {
break;
case DYNCALL_ARG_ASCIISTR:
case DYNCALL_ARG_UTF8STR:
case DYNCALL_ARG_UTF16STR:
case DYNCALL_ARG_CSTRUCT:
case DYNCALL_ARG_PACKEDARRAY:
case DYNCALL_ARG_CALLBACK:
Expand Down

0 comments on commit 896015d

Please sign in to comment.