1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

some perl fixes. NICK_REC is also now "iobject"..

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1358 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-03-07 12:09:38 +00:00 committed by cras
parent d2e7e041ff
commit 21ce8803d6
2 changed files with 12 additions and 7 deletions

View File

@ -24,7 +24,7 @@ while (<STDIN>) {
s/CHANNEL_REC[^,]*/iobject/g;
s/QUERY_REC[^,]*/iobject/g;
s/COMMAND_REC[^,]*/Irssi::Command/g;
s/NICK_REC[^,]*/Irssi::Nick/g;
s/NICK_REC[^,]*/iobject/g;
s/LOG_REC[^,]*/Irssi::Log/g;
s/RAWLOG_REC[^,]*/Irssi::Rawlog/g;
s/IGNORE_REC[^,]*/Irssi::Ignore/g;

View File

@ -55,7 +55,6 @@ static void perl_call_signal(const char *func, int signal_id,
int retcount;
PERL_SIGNAL_ARGS_REC *rec;
HV *stash;
SV *perlarg;
void *arg;
int n;
@ -82,13 +81,19 @@ static void perl_call_signal(const char *func, int signal_id,
else if (strncmp(rec->args[n], "gslist_", 7) == 0) {
/* linked list - push as AV */
GSList *tmp;
SV *sv;
AV *av;
int iobject;
iobject = strcmp(rec->args[n]+7, "iobject") == 0;
av = newAV();
stash = gv_stashpv(rec->args[n]+7, 0);
for (tmp = arg; tmp != NULL; tmp = tmp->next)
av_push(av, sv_2mortal(new_bless(tmp->data, stash)));
perlarg = (SV*)av;
for (tmp = arg; tmp != NULL; tmp = tmp->next) {
sv = iobject ? irssi_bless((SERVER_REC *) tmp->data) :
irssi_bless_plain(rec->args[n]+7, tmp->data);
av_push(av, sv);
}
perlarg = newRV_noinc((SV *) av);
} else if (arg == NULL) {
/* don't bless NULL arguments */
perlarg = newSViv(0);
@ -101,7 +106,7 @@ static void perl_call_signal(const char *func, int signal_id,
/* blessed object */
perlarg = irssi_bless_plain(rec->args[n], arg);
}
XPUSHs(sv_2mortal(perlarg));
XPUSHs(sv_2mortal(perlarg));
}
PUTBACK;