Looks like someone is confused... Array sizes are not mutable.
16493524 2008-05-12 13:56 /30 lines/ Brevbäraren
Recipients: Pike (-) ticket import
Subject: Array gets emptied if modified in function [4537]
Product: Pike
Version: 7.7
Component: Core
Reporter: peter@roxen.com
URL: https://community.roxen.com/crunch/show_bug.cgi?id=4537
Pike 7.7.45 from CVS as of a few hours ago:
% cat bug_array.pike
void fiddle(array a)
{
a += ({ 2 });
}
void main()
{
array a = ({});
fiddle( a );
if(!sizeof(a))
werror("Array is broken: %O\n", a);
else
werror("Array is ok: %O\n", a);
}
% ~/bin/pike77-2/bin/pike bug_array.pike
Array is broken: ({ })
(Initially reported by Tim Johansson, Opera Software)
(16493524) /Brevbäraren/--------------------------------------------