[svn:parrot] r36375 - trunk/src/pmc

Christoph Otto christoph at mksig.org
Fri Feb 6 01:12:31 UTC 2009


chromatic wrote:
> On Thursday 05 February 2009 01:43:08 cotto at svn.parrot.org wrote:
> 
>> Author: cotto
>> Date: Thu Feb  5 09:43:07 2009
>> New Revision: 36375
>> URL: https://trac.parrot.org/parrot/changeset/36375
>>
>> Log:
>> [pmc] fix bug from UnionVal to ATTR conversion
>>
>> Modified:
>>    trunk/src/pmc/resizableintegerarray.pmc
>> --- trunk/src/pmc/resizableintegerarray.pmc	Thu Feb  5 06:38:47
>> 2009	(r36374) +++ trunk/src/pmc/resizableintegerarray.pmc	Thu Feb  5
>> 09:43:07 2009	(r36375) @@ -113,10 +113,10 @@
>>          GET_ATTR_resize_threshold(INTERP, SELF, resize_threshold);
>>          if (!int_array) {
>>              /* empty - used fixed routine */
>> -            if (size < 8) {
>> -                SUPER(8);
>> +            if (size < 64) {
>> +                SUPER(64);
>>                  SET_ATTR_size(INTERP, SELF, size);
>> -                SET_ATTR_resize_threshold(INTERP, SELF, 8);
>> +                SET_ATTR_resize_threshold(INTERP, SELF, 64);
>>              }
>>              else {
>>                  SUPER(size);
> 
> What did 8 mean and what does 64 mean?  Can you #define a name which makes the 
> intent clearer?
> 
> -- c

This was an unintentional commit and has been reverted.  The original number 8 
was there before I changed with the code.  That doesn't mean that this code 
couldn't use fewer magic numbers, just that it wasn't part of my objective to 
change it either way.


More information about the parrot-dev mailing list