chromatic wrote:
On Sunday 15 April 2007 15:52, Jonathan Worthington wrote:
Sorry, I didn't get to adding one yet, but this should do it:
$P0 = new 'Class'
addattribute $P0 'foo'
Hm, it segfaults for me (and rightly so) if I instantiate a non-class
(try 'Hash' for some fun), but when I use this code (with the missing comma), I get:
$ parrot -t class_crash.pir
0 new P0, "Class" P0=PMCNULL
3 addattribute P0, "foo" P0=Class=PMC(0x820f530)
Null PMC access in get_string()
current instr.: 'main' pc 3 (class_crash.pir:3)
Curious, I thought I got a segfault out of it but maybe I remember
wrong. Anyway, I see you fixed it! :-)
Jonathan