[svn:parrot] r44763 - branches/tt1015/src/pmc
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Mon Mar 8 19:20:58 UTC 2010
Author: plobsing
Date: Mon Mar 8 19:20:56 2010
New Revision: 44763
URL: https://trac.parrot.org/parrot/changeset/44763
Log:
handle thawing of uninitialized FSAs (propagates to RSA)
Modified:
branches/tt1015/src/pmc/fixedstringarray.pmc
Modified: branches/tt1015/src/pmc/fixedstringarray.pmc
==============================================================================
--- branches/tt1015/src/pmc/fixedstringarray.pmc Mon Mar 8 19:07:24 2010 (r44762)
+++ branches/tt1015/src/pmc/fixedstringarray.pmc Mon Mar 8 19:20:56 2010 (r44763)
@@ -605,15 +605,18 @@
UINTVAL i, size;
STRING **str_array;
- SELF.init();
SUPER(info);
- size = VTABLE_shift_integer(INTERP, info);
- SELF.set_integer_native((INTVAL)size);
- GET_ATTR_str_array(INTERP, SELF, str_array);
+ SET_ATTR_size(INTERP, SELF, 0);
+ SET_ATTR_str_array(INTERP, SELF, NULL);
- for (i = 0; i < size; ++i)
- str_array[i] = VTABLE_shift_string(INTERP, info);
+ if ((size = VTABLE_shift_integer(INTERP, info))) {
+ SELF.set_integer_native((INTVAL)size);
+ GET_ATTR_str_array(INTERP, SELF, str_array);
+
+ for (i = 0; i < size; ++i)
+ str_array[i] = VTABLE_shift_string(INTERP, info);
+ }
}
}
More information about the parrot-commits
mailing list