diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-06 05:03:11 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-06 05:03:11 +0000 |
commit | e95f309b500e37ceb65f533fa0267a2864511228 (patch) | |
tree | e5f9e8705ceaa33fdd6c62c389312652de961865 /src/perl/common/Ignore.xs | |
parent | a99e93ef5d8dd4002580532ee25316c3860c1e4a (diff) | |
download | irssi-e95f309b500e37ceb65f533fa0267a2864511228.zip |
perl changes - values() method doesn't exist anymore, instead of
$server->values()->{...} you now use directly $server->{...}
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@972 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/common/Ignore.xs')
-rw-r--r-- | src/perl/common/Ignore.xs | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/perl/common/Ignore.xs b/src/perl/common/Ignore.xs index 643198f3..aab0db8b 100644 --- a/src/perl/common/Ignore.xs +++ b/src/perl/common/Ignore.xs @@ -8,7 +8,7 @@ PREINIT: PPCODE: stash = gv_stashpv("Irssi::Ignore", 0); for (tmp = servers; tmp != NULL; tmp = tmp->next) { - XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->data))), stash))); + push_bless(tmp->data, stash); } int @@ -41,29 +41,31 @@ MODULE = Irssi PACKAGE = Irssi::Ignore PREFIX = ignore_ #******************************* void -values(ignore) +init(ignore) Irssi::Ignore ignore PREINIT: HV *hv; AV *av; char **tmp; -PPCODE: - hv = newHV(); - hv_store(hv, "mask", 4, new_pv(ignore->mask), 0); - hv_store(hv, "servertag", 9, new_pv(ignore->servertag), 0); - av = newAV(); - for (tmp = ignore->channels; *tmp != NULL; tmp++) { - av_push(av, new_pv(*tmp)); - } - hv_store(hv, "channels", 8, newRV_noinc((SV*)av), 0); - hv_store(hv, "pattern", 7, new_pv(ignore->pattern), 0); +CODE: + hv = hvref(ST(0)); + if (hv != NULL) { + hv_store(hv, "mask", 4, new_pv(ignore->mask), 0); + hv_store(hv, "servertag", 9, new_pv(ignore->servertag), 0); + av = newAV(); + for (tmp = ignore->channels; *tmp != NULL; tmp++) { + av_push(av, new_pv(*tmp)); + } + hv_store(hv, "channels", 8, newRV_noinc((SV*)av), 0); + hv_store(hv, "pattern", 7, new_pv(ignore->pattern), 0); - hv_store(hv, "level", 5, newSViv(ignore->level), 0); - hv_store(hv, "except_level", 12, newSViv(ignore->except_level), 0); + hv_store(hv, "level", 5, newSViv(ignore->level), 0); + hv_store(hv, "except_level", 12, newSViv(ignore->except_level), 0); - hv_store(hv, "regexp", 6, newSViv(ignore->regexp), 0); - hv_store(hv, "fullword", 8, newSViv(ignore->fullword), 0); - XPUSHs(sv_2mortal(newRV_noinc((SV*)hv))); + hv_store(hv, "regexp", 6, newSViv(ignore->regexp), 0); + hv_store(hv, "fullword", 8, newSViv(ignore->fullword), 0); + XPUSHs(sv_2mortal(newRV_noinc((SV*)hv))); + } void ignore_add_rec(rec) |