Branch: Tag:

2003-04-28

2003-04-28 18:32:38 by Martin Stjernholm <mast@lysator.liu.se>

array_column can't always be destructive on its argument, even when it has
only one ref.

Rev: src/array.c:1.146
Rev: src/array.h:1.52
Rev: src/builtin.cmod:1.135
Rev: src/testsuite.in:1.638

1: - test_true([["$Id: testsuite.in,v 1.637 2003/04/27 17:51:58 mast Exp $"]]); + test_true([["$Id: testsuite.in,v 1.638 2003/04/28 18:32:38 mast Exp $"]]);      // This triggered a bug only if run sufficiently early.   test_compile_any([[#pike 7.2]])
7945:   test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),0)]],[[({1,5,8})]])   test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),1)]],[[({2,6,9})]])   test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),2)]],[[({3,7,0})]]) + test_any_equal([[ +  array a = ({({(["foo": 17])})}); +  mixed res = column (a, "foo"); // Avoid constant optimization. +  return res && a[0][0]; + ]], (["foo": 17]))      // - combine_path   test_eq([[combine_path("/foo/bar/gazonk/","..")]],"/foo/bar")