summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-07 12:09:38 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-07 12:09:38 +0000
commit21ce8803d6f124b9889e5d2aa9458f538f17eb7f (patch)
tree15ac50c0b2c87df6fef737b4528a5c657408967b /src
parentd2e7e041ffd7acebee62e22afeb40af79c70c926 (diff)
downloadirssi-21ce8803d6f124b9889e5d2aa9458f538f17eb7f.zip
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
Diffstat (limited to 'src')
-rwxr-xr-xsrc/perl/get-signals.pl2
-rw-r--r--src/perl/perl-signals.c17
2 files changed, 12 insertions, 7 deletions
diff --git a/src/perl/get-signals.pl b/src/perl/get-signals.pl
index 70263d08..56a5753a 100755
--- a/src/perl/get-signals.pl
+++ b/src/perl/get-signals.pl
@@ -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;
diff --git a/src/perl/perl-signals.c b/src/perl/perl-signals.c
index d4d3fa16..7f0db750 100644
--- a/src/perl/perl-signals.c
+++ b/src/perl/perl-signals.c
@@ -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;