1
0
mirror of https://github.com/irssi/irssi.git synced 2025-01-03 14:56:47 -05:00
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1101 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-10 21:12:39 +00:00 committed by cras
parent 6c97f13cad
commit ebdaa110f1
4 changed files with 9 additions and 9 deletions

View File

@ -6,11 +6,11 @@ signal_emit(signal, ...)
PREINIT:
STRLEN n_a;
CODE:
void *p[7];
void *p[SIGNAL_MAX_ARGUMENTS];
int n;
memset(p, 0, sizeof(p));
for (n = 1; n < items && n < 7; n++) {
for (n = 1; n < items && n < SIGNAL_MAX_ARGUMENTS+1; n++) {
if (SvPOKp(ST(n)))
p[n-1] = SvPV(ST(n), n_a);
else if (irssi_is_ref_object(ST(n)))
@ -18,7 +18,7 @@ CODE:
else
p[n-1] = (void *) SvIV((SV*)SvRV(ST(n)));
}
signal_emit(signal, items-1, p[0], p[1], p[2], p[3], p[4], p[5], p[6]);
signal_emit(signal, items-1, p[0], p[1], p[2], p[3], p[4], p[5]);
void
signal_add(signal, func)

View File

@ -47,7 +47,7 @@ while (<STDIN>) {
s/WI_ITEM_REC[^,]*/iobject/g;
s/([\w:]+)(,|$)/"\1"\2/g;
print " { -1, \"$signal\", { $_, NULL } },\n";
print " { \"$signal\", { $_, NULL } },\n";
}
print "\n { -1, NULL }\n};\n";
print "\n { NULL }\n};\n";

View File

@ -109,7 +109,7 @@ void *irssi_ref_object(SV *o)
hv = hvref(o);
if (hv == NULL)
return 0;
return NULL;
sv = hv_fetch(hv, "_irssi", 6, 0);
if (sv == NULL)

View File

@ -16,7 +16,6 @@ typedef struct {
} PERL_SIGNAL_REC;
typedef struct {
int signal_id;
char *signal;
char *args[7];
} PERL_SIGNAL_ARGS_REC;
@ -53,7 +52,7 @@ static void perl_call_signal(const char *func, int signal_id,
gconstpointer *args)
{
dSP;
int retcount, ret;
int retcount;
PERL_SIGNAL_ARGS_REC *rec;
HV *stash;
@ -347,8 +346,9 @@ void perl_signals_init(void)
perl_signal_args_partial =
g_slist_append(perl_signal_args_partial, rec);
} else {
int signal_id = signal_get_uniq_id(rec->signal);
g_hash_table_insert(perl_signal_args_hash,
GINT_TO_POINTER(rec->signal_id),
GINT_TO_POINTER(signal_id),
rec);
}
}