Mercurial > pidgin.yaz
diff plugins/perl/perl.c @ 6536:9767117bc47e
[gaim-migrate @ 7053]
Fixed some C99isms.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 21 Aug 2003 01:33:48 +0000 |
parents | 7c42b8ca3222 |
children | ed796f756237 |
line wrap: on
line diff
--- a/plugins/perl/perl.c Thu Aug 21 01:32:12 2003 +0000 +++ b/plugins/perl/perl.c Thu Aug 21 01:33:48 2003 +0000 @@ -312,28 +312,30 @@ execute_perl("load_n_eval", 1, atmp); - dSP; - ENTER; - SAVETMPS; - PUSHMARK(sp); - XPUSHs(sv_2mortal(gaim_perl_bless_object(plugin, "Gaim::Plugin"))); - PUTBACK; + { + dSP; + ENTER; + SAVETMPS; + PUSHMARK(sp); + XPUSHs(sv_2mortal(gaim_perl_bless_object(plugin, "Gaim::Plugin"))); + PUTBACK; - perl_call_pv(gps->load_sub, G_EVAL | G_SCALAR); - SPAGAIN; + perl_call_pv(gps->load_sub, G_EVAL | G_SCALAR); + SPAGAIN; - if (SvTRUE(ERRSV)) { - int len; + if (SvTRUE(ERRSV)) { + int len; - gaim_debug(GAIM_DEBUG_ERROR, "perl", - "Perl function %s exited abnormally: %s\n", - gps->load_sub, SvPV(ERRSV, len)); + gaim_debug(GAIM_DEBUG_ERROR, "perl", + "Perl function %s exited abnormally: %s\n", + gps->load_sub, SvPV(ERRSV, len)); + } + + PUTBACK; + FREETMPS; + LEAVE; } - PUTBACK; - FREETMPS; - LEAVE; - return TRUE; } @@ -347,28 +349,30 @@ gaim_debug(GAIM_DEBUG_INFO, "perl", "Unloading perl script\n"); - dSP; - ENTER; - SAVETMPS; - PUSHMARK(sp); - XPUSHs(sv_2mortal(gaim_perl_bless_object(plugin, "Gaim::Plugin"))); - PUTBACK; + { + dSP; + ENTER; + SAVETMPS; + PUSHMARK(sp); + XPUSHs(sv_2mortal(gaim_perl_bless_object(plugin, "Gaim::Plugin"))); + PUTBACK; - perl_call_pv(gps->unload_sub, G_EVAL | G_SCALAR); - SPAGAIN; + perl_call_pv(gps->unload_sub, G_EVAL | G_SCALAR); + SPAGAIN; - if (SvTRUE(ERRSV)) { - int len; + if (SvTRUE(ERRSV)) { + int len; - gaim_debug(GAIM_DEBUG_ERROR, "perl", - "Perl function %s exited abnormally: %s\n", - gps->load_sub, SvPV(ERRSV, len)); - } + gaim_debug(GAIM_DEBUG_ERROR, "perl", + "Perl function %s exited abnormally: %s\n", + gps->load_sub, SvPV(ERRSV, len)); + } - PUTBACK; - FREETMPS; - LEAVE; + PUTBACK; + FREETMPS; + LEAVE; + } gaim_signals_disconnect_by_handle(plugin); gaim_perl_timeout_clear_for_plugin(plugin);