Skip to content

Commit

Permalink
fix #5245
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Dec 28, 2013
1 parent 061c867 commit 851b2c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ static native_sym_arg_t interpret_symbol_arg(jl_value_t *arg, jl_codectx_t *ctx,
"cglobal: first argument not a pointer or valid constant expression",
ctx);
}
jl_ptr = emit_unbox(T_size, arg1, ptr_ty);
jl_ptr = emit_unbox(T_size, arg1, (jl_value_t*)jl_voidpointer_type);
}

void *fptr=NULL;
Expand Down
3 changes: 1 addition & 2 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,7 @@ static Value *boxed(Value *v, jl_codectx_t *ctx, jl_value_t *jt)
Value *tpl = builder.CreateCall(jl_alloc_tuple_func,ConstantInt::get(T_size,n));
int last_depth = ctx->argDepth;
make_gcroot(tpl,ctx);
for (size_t i = 0; i < n; ++i)
{
for (size_t i = 0; i < n; ++i) {
jl_value_t *jti = jl_tupleref(jt,i);
Value *vi = emit_tupleref(v,ConstantInt::get(T_size,i+1),jt,ctx);
emit_tupleset(tpl,ConstantInt::get(T_size,i+1),boxed(vi,ctx,jti),jt,ctx);
Expand Down

0 comments on commit 851b2c8

Please sign in to comment.