mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
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:
parent
a99e93ef5d
commit
e95f309b50
22 changed files with 412 additions and 326 deletions
|
|
@ -8,9 +8,7 @@ PREINIT:
|
|||
PPCODE:
|
||||
stash = gv_stashpv("Irssi::Window", 0);
|
||||
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
|
||||
WINDOW_REC *rec = tmp->data;
|
||||
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(rec))), stash)));
|
||||
push_bless(tmp->data, stash);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -134,32 +132,29 @@ MODULE = Irssi PACKAGE = Irssi::Window PREFIX=window_
|
|||
#*******************************
|
||||
|
||||
void
|
||||
values(window)
|
||||
init(window)
|
||||
Irssi::Window window
|
||||
PREINIT:
|
||||
HV *hv;
|
||||
PPCODE:
|
||||
hv = newHV();
|
||||
hv_store(hv, "refnum", 6, newSViv(window->refnum), 0);
|
||||
hv_store(hv, "name", 4, new_pv(window->name), 0);
|
||||
CODE:
|
||||
hv = hvref(ST(0));
|
||||
if (hv != NULL) {
|
||||
hv_store(hv, "refnum", 6, newSViv(window->refnum), 0);
|
||||
hv_store(hv, "name", 4, new_pv(window->name), 0);
|
||||
|
||||
if (window->active) {
|
||||
hv_store(hv, "active", 6, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(window->active))),
|
||||
irssi_get_stash(window->active)), 0);
|
||||
if (window->active)
|
||||
hv_store(hv, "active", 6, irssi_bless(window->active), 0);
|
||||
if (window->active_server)
|
||||
hv_store(hv, "active_server", 13, irssi_bless(window->active_server), 0);
|
||||
|
||||
hv_store(hv, "lines", 5, newSViv(window->lines), 0);
|
||||
|
||||
hv_store(hv, "level", 5, newSViv(window->level), 0);
|
||||
hv_store(hv, "new_data", 8, newSViv(window->new_data), 0);
|
||||
hv_store(hv, "last_color", 10, newSViv(window->last_color), 0);
|
||||
hv_store(hv, "last_timestamp", 14, newSViv(window->last_timestamp), 0);
|
||||
hv_store(hv, "last_line", 9, newSViv(window->last_line), 0);
|
||||
}
|
||||
if (window->active_server) {
|
||||
hv_store(hv, "active_server", 13, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(window->active_server))),
|
||||
irssi_get_stash(window->active_server)), 0);
|
||||
}
|
||||
|
||||
hv_store(hv, "lines", 5, newSViv(window->lines), 0);
|
||||
|
||||
hv_store(hv, "level", 5, newSViv(window->level), 0);
|
||||
hv_store(hv, "new_data", 8, newSViv(window->new_data), 0);
|
||||
hv_store(hv, "last_color", 10, newSViv(window->last_color), 0);
|
||||
hv_store(hv, "last_timestamp", 14, newSViv(window->last_timestamp), 0);
|
||||
hv_store(hv, "last_line", 9, newSViv(window->last_line), 0);
|
||||
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
|
||||
|
||||
void
|
||||
items(window)
|
||||
|
|
@ -170,8 +165,7 @@ PPCODE:
|
|||
for (tmp = window->items; tmp != NULL; tmp = tmp->next) {
|
||||
CHANNEL_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)));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -263,19 +257,6 @@ OUTPUT:
|
|||
MODULE = Irssi PACKAGE = Irssi::Windowitem
|
||||
#*******************************
|
||||
|
||||
void
|
||||
values(item)
|
||||
Irssi::Windowitem item
|
||||
PREINIT:
|
||||
HV *hv;
|
||||
PPCODE:
|
||||
hv = newHV();
|
||||
hv_store(hv, "server", 6, sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(item->server))),
|
||||
irssi_get_stash(item->server)), 0);
|
||||
hv_store(hv, "name", 4, new_pv(item->name), 0);
|
||||
hv_store(hv, "new_data", 8, newSViv(item->new_data), 0);
|
||||
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
|
||||
|
||||
void
|
||||
command(item, cmd)
|
||||
Irssi::Windowitem item
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue