Bool AbstractMenu_sub_call( Handle self, PMenuItemReg m) { char buffer[16], *context; if ( m == nil) return false; context = AbstractMenu_make_var_context( self, m, buffer); if ( m-> flags. autotoggle ) { m-> flags. checked = m-> flags. checked ? 0 : 1; apc_menu_item_set_check( self, m); } if ( m-> code) { if ( m-> flags. utf8_variable) { SV * sv = newSVpv( context, 0); SvUTF8_on( sv); cv_call_perl((( PComponent) var-> owner)-> mate, SvRV( m-> code), "Si", sv, m-> flags. checked); sv_free( sv); } else cv_call_perl((( PComponent) var-> owner)-> mate, SvRV( m-> code), "si", context, m-> flags. checked); } else if ( m-> perlSub) { if ( m-> flags. utf8_variable) { SV * sv = newSVpv( context, 0); SvUTF8_on( sv); call_perl( var-> owner, m-> perlSub, "Si", sv, m-> flags. checked); sv_free( sv); } else call_perl( var-> owner, m-> perlSub, "si", context, m-> flags. checked); } return true; }
static void sig_lastsignal(void *signal, ...) { GSList *list; va_list va; va_start(va, signal); list = g_hash_table_lookup(last_signals, signal); while (list != NULL) { PERL_SIGNAL_REC *rec = list->data; if (call_perl(rec->func, GPOINTER_TO_INT(signal), va)) { signal_stop(); return; } list = list->next; } va_end(va); }