ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.137 by root, Mon Feb 21 07:41:03 2011 UTC vs.
Revision 1.138 by root, Mon Feb 21 08:10:10 2011 UTC

413 ENTER; 413 ENTER;
414 SAVETMPS; 414 SAVETMPS;
415 415
416 PUSHMARK (SP); 416 PUSHMARK (SP);
417 417
418 EXTEND (SP, 2);
418 XPUSHs (sv_2mortal (newSVterm (term))); 419 PUSHs (sv_2mortal (newSVterm (term)));
419 XPUSHs (sv_2mortal (newSViv (htype))); 420 PUSHs (sv_2mortal (newSViv (htype)));
420 421
421 for (;;) { 422 for (;;) {
422 data_type dt = (data_type)va_arg (ap, int); 423 data_type dt = (data_type)va_arg (ap, int);
423 424
424 switch (dt) 425 switch (dt)
581 FREETMPS; 582 FREETMPS;
582 LEAVE; 583 LEAVE;
583 584
584 if (SvTRUE (ERRSV)) 585 if (SvTRUE (ERRSV))
585 { 586 {
586 rxvt_warn ("perl hook %d evaluation error: %s", htype, SvPV_nolen (ERRSV)); 587 rxvt_warn ("perl hook %d evaluation error: %s", htype, SvPVbyte_nolen (ERRSV));
587 ungrab (term); // better lose the grab than the session 588 ungrab (term); // better lose the grab than the session
588 } 589 }
589 590
590 event_consumed = !!count; 591 event_consumed = !!count;
591 } 592 }
608 // don't allow further calls 609 // don't allow further calls
609 term->perl.self = 0; 610 term->perl.self = 0;
610 } 611 }
611 612
612 return event_consumed; 613 return event_consumed;
614}
615
616void
617rxvt_perl_interp::selection_finish (rxvt_selection *sel, char *data, unsigned int len)
618{
619 localise_env set_environ (perl_environ);
620
621 ENTER;
622 SAVETMPS;
623
624 dSP;
625 XPUSHs (sv_2mortal (newSVpvn (data, len)));
626 call_sv ((SV *)sel->cb_sv, G_VOID | G_DISCARD | G_EVAL);
627
628 if (SvTRUE (ERRSV))
629 rxvt_warn ("perl selection callback evaluation error: %s", SvPVbyte_nolen (ERRSV));
630
631 FREETMPS;
632 LEAVE;
613} 633}
614 634
615///////////////////////////////////////////////////////////////////////////// 635/////////////////////////////////////////////////////////////////////////////
616 636
617MODULE = urxvt PACKAGE = urxvt 637MODULE = urxvt PACKAGE = urxvt

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines