Skip to content

Commit

Permalink
Fix jl_apply_array_type (root boxed dim)
Browse files Browse the repository at this point in the history
  • Loading branch information
tknopp committed Jan 24, 2014
1 parent 072a861 commit 90754df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,11 @@ DLLEXPORT void *jl_value_ptr(jl_value_t *a);
DLLEXPORT void jl_cell_1d_push(jl_array_t *a, jl_value_t *item);
STATIC_INLINE jl_value_t *jl_apply_array_type(jl_datatype_t *type, size_t dim)
{
return jl_apply_type((jl_value_t*)jl_array_type, jl_tuple2(type, jl_box_long(dim)));
jl_value_t *boxed_dim = jl_box_long(dim);
JL_GC_PUSH1(&boxed_dim);
jl_value_t *ret = jl_apply_type((jl_value_t*)jl_array_type, jl_tuple2(type, boxed_dim));
JL_GC_POP();
return ret;
}

// eq hash tables
Expand Down

0 comments on commit 90754df

Please sign in to comment.