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
This commit is contained in:
Timo Sirainen 2000-12-06 05:03:11 +00:00 committed by cras
commit e95f309b50
22 changed files with 412 additions and 326 deletions

View file

@ -32,23 +32,24 @@ MODULE = Irssi PACKAGE = Irssi::Rawlog PREFIX = rawlog_
#*******************************
void
values(rawlog)
init(rawlog)
Irssi::Rawlog rawlog
PREINIT:
HV *hv;
AV *av;
GSList *tmp;
PPCODE:
hv = newHV();
hv_store(hv, "logging", 7, newSViv(rawlog->logging), 0);
hv_store(hv, "nlines", 6, newSViv(rawlog->nlines), 0);
CODE:
hv = hvref(ST(0));
if (hv != NULL) {
hv_store(hv, "logging", 7, newSViv(rawlog->logging), 0);
hv_store(hv, "nlines", 6, newSViv(rawlog->nlines), 0);
av = newAV();
for (tmp = rawlog->lines; tmp != NULL; tmp = tmp->next) {
av_push(av, new_pv(tmp->data));
av = newAV();
for (tmp = rawlog->lines; tmp != NULL; tmp = tmp->next) {
av_push(av, new_pv(tmp->data));
}
hv_store(hv, "lines", 5, newRV_noinc((SV*)av), 0);
}
hv_store(hv, "lines", 5, newRV_noinc((SV*)av), 0);
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
void
rawlog_destroy(rawlog)