mdiep wrote:
> Trying to use an Iterator with a NameSpace makes Parrot segfault:
> 
>    mini:~/Projects/parrot mdiep$ cat test.pir
>    .sub main :main
>      .local pmc iter, ns
>      ns = get_namespace
> 
>      iter = new .Iterator, ns
>    loop:
>      unless iter goto loop_end
>      $P0 = shift iter
> 
>      $S0 = $P0
>      print $S0
>      print "\n"
>      goto loop
> 
>    loop_end:
>      end
>    .end
> 
>    mini:~/Projects/parrot mdiep$ parrot test.pir
>    Segmentation fault
>    mini:~/Projects/parrot mdiep$

FYI, changing C< $P0 = shift iter > to C< $S0 = shift iter > makes this example 
work 
corrrectly (of course, you also have to remove C< $S0 = $P0 >).

--
Matt Diephouse 



Reply via email to