Skip to content

Commit

Permalink
Apply reinterpret_cast to jl_voidpointer_type. Fixes #41.
Browse files Browse the repository at this point in the history
  • Loading branch information
twadleigh committed Feb 25, 2017
1 parent 78a882e commit 66b50cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mexjulia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void mexFunction(int nl, mxArray* pl[], int nr, const mxArray* pr[])
jl_value_t **args;
JL_GC_PUSHARGS(args, 4);
args[0] = (jl_value_t *)fn;
args[1] = jl_apply_array_type(jl_voidpointer_type, 1);
args[1] = jl_apply_array_type(reinterpret_cast<jl_value_t *>(jl_voidpointer_type), 1);
args[2] = (jl_value_t *)jl_ptr_to_array_1d(args[1], pl, nl > 1 ? nl : 1, 0);
args[3] = (jl_value_t *)jl_ptr_to_array_1d(args[1], pr + 1, nr - 1, 0);
jl_call2(fn, args[2], args[3]);
Expand Down

1 comment on commit 66b50cd

@andreasnoack
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this broke mexjulia on 0.5. At least it works for me when I revert this commit. See #44.

Please sign in to comment.