Ticket #1295: tt_1295.patch
File tt_1295.patch, 1.0 KB (added by whiteknight, 12 years ago) |
---|
-
src/pmc/fixedpmcarray.pmc
484 484 else { 485 485 PMC *box = SELF.get_pmc_keyed_int(k); 486 486 487 /* RT #46675: autovivify an Array and insert it in SELF */ 488 if (!box) 487 if (!box) { 489 488 box = pmc_new(INTERP, SELF.type()); 489 SELF.set_pmc_keyed_int(k, box); 490 } 490 491 491 492 VTABLE_set_number_keyed(INTERP, box, nextkey, value); 492 493 } … … 572 573 else { 573 574 PMC *box = SELF.get_pmc_keyed_int(k); 574 575 575 /* RT #46675: autovivify an Array and insert it in SELF */ 576 if (!box) 576 if (!box) { 577 577 box = pmc_new(INTERP, SELF.type()); 578 VTABLE_set_pmc_keyed_int(INTERP, SELF, k, box); 579 } 578 580 579 581 VTABLE_set_pmc_keyed(INTERP, box, nextkey, value); 580 582 }