diff options
author | Gurusamy Sarathy <gsar@engin.umich.edu> | 1996-10-08 23:54:47 -0400 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-10-08 23:54:47 -0400 |
commit | 6bf554b4f0803e34bfc05c3750580299121acab2 (patch) | |
tree | 93113df0d9324d499141037cf1978eebc7ca9bc9 | |
parent | 3efb289c5aa248a1ab52c54c98d6021518b11684 (diff) | |
download | perl-6bf554b4f0803e34bfc05c3750580299121acab2.tar.gz |
Re: Sorting lists of integers doesn't always work
>> > print sort (4,1,2,3);
>> >
>> > actually prints "4123", i.e. doesn't actually sort. Bug? Feature?
This broke between 5.001n and 5.002. There was a long winded thread
about sorting undefs in some order (rather than coredumping) around
the 5.002beta times (search for "bogorefs" in the subject-line on
p5p archive for details). Larry added in some code that presumes that
the private flags are set by the time qsort() is called:
Unfortunately, sv_2pv() does not set the POKp flag, so the above
code breaks! Here's a patch against 5.00306.
-rw-r--r-- | sv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1517,7 +1517,7 @@ STRLEN *lp; s = SvGROW(sv, len + 1); SvCUR_set(sv, len); (void)strcpy(s, tokenbuf); - /* NO SvPOK_on(sv) here! */ + SvPOKp_on(sv); return s; } } |