Mercurial > pidgin
diff plugins/perl/perl-handlers.c @ 6566:f6c2a7b5afa7
[gaim-migrate @ 7088]
PERL SIGNAL HANDLING WORKS!!!! Ahem. I shall now continue professionally
developing other aspects of this instant messenger application. WOOHOO
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 21 Aug 2003 23:41:52 +0000 |
parents | 28b38803d0bb |
children | 6e25e1e08ffb |
line wrap: on
line diff
--- a/plugins/perl/perl-handlers.c Thu Aug 21 23:26:13 2003 +0000 +++ b/plugins/perl/perl-handlers.c Thu Aug 21 23:41:52 2003 +0000 @@ -55,21 +55,35 @@ perl_signal_cb(va_list args, void *data) { GaimPerlSignalHandler *handler = (GaimPerlSignalHandler *)data; - void *arg; void *ret_val = NULL; + int i; int count; + int value_count; + GaimValue *ret_value, **values; dSP; ENTER; SAVETMPS; PUSHMARK(sp); - while ((arg = va_arg(args, void *)) != NULL) - XPUSHs((SV *)arg); + gaim_signal_get_values(handler->instance, handler->signal, + &ret_value, &value_count, &values); + + for (i = 0; i < value_count; i++) + { + SV *sv = gaim_perl_sv_from_vargs(values[i], args); + gaim_debug(GAIM_DEBUG_INFO, "perl", "Pushing arg %p\n", sv); + + XPUSHs(sv); + } + + gaim_debug(GAIM_DEBUG_INFO, "perl", "Pushing data %p\n", handler->data); XPUSHs((SV *)handler->data); PUTBACK; + gaim_debug(GAIM_DEBUG_INFO, "perl", "Calling handler %s\n", + handler->func); count = call_pv(handler->func, G_EVAL | G_SCALAR); SPAGAIN;