Changeset db8b00b for perlconfig.c


Ignore:
Timestamp:
Oct 27, 2006, 3:07:59 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
bbd2fdc
Parents:
e74c01c
Message:
Exposing edit window hooks to perl
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    r6922edd rdb8b00b  
    378378  SvREFCNT_dec(cmd);
    379379}
     380
     381void owl_perlconfig_edit_callback(owl_editwin *e)
     382{
     383  SV *cb = (SV*)(e->cbdata);
     384  if(cb == NULL) {
     385    owl_function_error("Perl callback is NULL!");
     386  }
     387
     388  dSP;
     389
     390  ENTER;
     391  SAVETMPS;
     392
     393  PUSHMARK(SP);
     394  XPUSHs(sv_2mortal(newSVpv(owl_editwin_get_text(e), 0)));
     395  PUTBACK;
     396 
     397  call_sv(cb, G_DISCARD);
     398
     399  FREETMPS;
     400  LEAVE;
     401
     402  SvREFCNT_dec(cb);
     403  e->cbdata = NULL;
     404}
Note: See TracChangeset for help on using the changeset viewer.