Are you thinking of array_insert, resize_array, array_shrink and array_remove? They can only be used if the array got one reference. It's not possible to destructively do operations on arrays that change their size, so those functions only exist to implement optimizations in the one reference case.
(The functions don't actually check the one-reference rule thoroughly since the array could still have extra refs on the stack that aren't significant, i.e. the array is still only referable through one reference from external code.)
/ Martin Stjernholm, Roxen IS
Previous text:
2003-01-10 19:50: Subject: array.c
Since I don't have great experience with the pike code i though I better ask before I change. I've been working a bit with array.c and in some places does the code set the size of the array to 0 before it call free_array. Line 326 in the function array_insert is an example. Shold it do that? I believe this cause problems when I have an array with more than one reference.
/ Peta, jo det är jag