Skip to content

Commit a0b65ad

Browse files
authored
Array: use jl_array_ptr_set to avoid failed assertion on nightly (#139)
fixup #137
1 parent f1c42d9 commit a0b65ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/jlcxx/array.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ class Array
131131
void push_back(VT&& val)
132132
{
133133
JL_GC_PUSH1(&m_array);
134+
const size_t pos = jl_array_len(m_array);
135+
jl_array_grow_end(m_array, 1);
134136
jl_value_t* jval = box<ValueT>(val);
135-
jl_array_ptr_1d_push(m_array, jval);
137+
jl_array_ptr_set(m_array, pos, jval);
136138
JL_GC_POP();
137139
}
138140

0 commit comments

Comments
 (0)