summaryrefslogtreecommitdiff
path: root/src/perl/common/Query.xs
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-12-06 05:03:11 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-12-06 05:03:11 +0000
commite95f309b500e37ceb65f533fa0267a2864511228 (patch)
treee5f9e8705ceaa33fdd6c62c389312652de961865 /src/perl/common/Query.xs
parenta99e93ef5d8dd4002580532ee25316c3860c1e4a (diff)
downloadirssi-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/Query.xs')
-rw-r--r--src/perl/common/Query.xs16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/perl/common/Query.xs b/src/perl/common/Query.xs
index 78004e06..47758229 100644
--- a/src/perl/common/Query.xs
+++ b/src/perl/common/Query.xs
@@ -8,8 +8,7 @@ PPCODE:
for (tmp = queries; tmp != NULL; tmp = tmp->next) {
QUERY_REC *rec = tmp->data;
- XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))),
- irssi_get_stash(rec))));
+ XPUSHs(sv_2mortal(irssi_bless(rec)));
}
#*******************************
@@ -25,8 +24,7 @@ PPCODE:
for (tmp = server->queries; tmp != NULL; tmp = tmp->next) {
QUERY_REC *rec = tmp->data;
- XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))),
- irssi_get_stash(rec))));
+ XPUSHs(sv_2mortal(irssi_bless(rec)));
}
Irssi::Query
@@ -46,14 +44,10 @@ MODULE = Irssi PACKAGE = Irssi::Query PREFIX = query_
#*******************************
void
-values(query)
+init(query)
Irssi::Query query
-PREINIT:
- HV *hv;
-PPCODE:
- hv = newHV();
- perl_query_fill_hash(hv, query);
- XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
+CODE:
+ perl_query_fill_hash(hvref(ST(0)), query);
void
query_destroy(query)