Re: moving the stack in XS

2004-05-21 Thread Nick Ing-Simmons
Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes: >I'm trying to write an XS module that will allow people to move forward >(or backward) within a for(each) loop. The canonical example would be: > > my @data = (1 .. 10) { > > for (@data) { >my $next = For::next_iter(); >print "$_, $next\n"

moving the stack in XS

2004-05-18 Thread Jeff 'japhy' Pinyan
I'm trying to write an XS module that will allow people to move forward (or backward) within a for(each) loop. The canonical example would be: my @data = (1 .. 10) { for (@data) { my $next = For::next_iter(); print "$_, $next\n"; } And the output would be 1, 2 3, 4 5, 6 7