1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

array.v: make _push private

This commit is contained in:
Alexander Medvednikov 2019-06-29 23:56:55 +02:00
parent 159990132f
commit d0c47f3f2a

View File

@ -156,7 +156,7 @@ pub fn (a mut array) set(idx int, val voidptr) {
C.memcpy(a.data + a.element_size * idx, val, a.element_size)
}
pub fn (arr mut array) _push(val voidptr) {
fn (arr mut array) _push(val voidptr) {
if arr.len >= arr.cap - 1 {
cap := (arr.len + 1) * 2
// println('_push: realloc, new cap=$cap')