Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow nativecast from VMArray e.g. Blob/Buf
  • Loading branch information
raydiak committed Apr 2, 2015
1 parent c3bf959 commit 7af5df6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/nativecall.c
Expand Up @@ -948,9 +948,11 @@ MVMObject * MVM_nativecall_cast(MVMThreadContext *tc, MVMObject *target_spec, MV
data_body = unmarshal_cpointer(tc, source);
} else if (REPR(source)->ID == MVM_REPR_ID_MVMCArray) {
data_body = unmarshal_carray(tc, source);
} else if (REPR(source)->ID == MVM_REPR_ID_MVMArray) {
data_body = unmarshal_vmarray(tc, source);
} else {
MVM_exception_throw_adhoc(tc,
"Native call expected return type with CPointer, CStruct, or CArray representation, but got a %s", REPR(source)->name);
"Native call expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a %s", REPR(source)->name);
}
return nativecall_cast(tc, target_spec, target_type, data_body);
}
Expand Down

0 comments on commit 7af5df6

Please sign in to comment.