Skip to content

Commit

Permalink
Array: use jl_array_ptr_set to avoid failed assertion on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
benlorenz committed Dec 20, 2023
1 parent f1c42d9 commit dbcf089
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/jlcxx/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ class Array
void push_back(VT&& val)
{
JL_GC_PUSH1(&m_array);
const size_t pos = jl_array_len(m_array);
jl_array_grow_end(m_array, 1);
jl_value_t* jval = box<ValueT>(val);
jl_array_ptr_1d_push(m_array, jval);
jl_array_ptr_set(m_array, pos, jval);
JL_GC_POP();
}

Expand Down

0 comments on commit dbcf089

Please sign in to comment.