Changeset 14411 for dan

Show
Ignore:
Timestamp:
06/22/08 15:07:42 (5 months ago)
Author:
yappo
Message:

next をハック

Location:
dan/perl/PL_check/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • dan/perl/PL_check/trunk/hack.xs

    r14302 r14411  
    55#include "XSUB.h" 
    66 
     7#include "ppport.h" 
     8 
     9OP * next_hack_ppaddr(pTHX) { 
     10    PerlIO_printf(PerlIO_stderr(), "next_hack_ppaddr\n"); 
     11   return PL_ppaddr[OP_NEXT](aTHXR); 
     12} 
    713 
    814static OP *(*hack_old_enterloop)(pTHX_ OP *op) = NULL; 
     
    3238OP * hack_next(pTHX_ OP *o) { 
    3339   PerlIO_printf(PerlIO_stderr(), "hack_next\n"); 
     40   o->op_ppaddr = next_hack_ppaddr; 
    3441   return CALL_FPTR(hack_old_next)(aTHX_ o); 
    3542} 
  • dan/perl/PL_check/trunk/test.pl

    r14302 r14411  
    1717 
    1818 
    19 exit; 
     19#exit; 
     20warn "running"; 
    2021 
    2122so; 
    2223BEGIN { warn "My->new" } 
    2324my $obj = My->new; 
    24 $obj->hoge; 
     25#$obj->hoge; 
    2526 
    2627while (1) { 
     
    2930 
    3031for (1..2) { 
     32    warn "for loop in"; 
    3133    next; 
     34    warn "for after next"; 
    3235} 
     36warn "for end"; 
    3337 
    3438for (1..2) {