mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 16:12:30 +02:00
Perl updates
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@707 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
54ee1c6e8c
commit
c48a05c3e8
25 changed files with 188 additions and 737 deletions
76
src/perl/core/Log.xs
Normal file
76
src/perl/core/Log.xs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
MODULE = Irssi PACKAGE = Irssi
|
||||
|
||||
void
|
||||
logs()
|
||||
PREINIT:
|
||||
GSList *tmp;
|
||||
HV *stash;
|
||||
PPCODE:
|
||||
stash = gv_stashpv("Irssi::Log", 0);
|
||||
for (tmp = logs; tmp != NULL; tmp = tmp->next) {
|
||||
XPUSHs(sv_2mortal(sv_bless(newRV_noinc(newSViv(GPOINTER_TO_INT(tmp->data))), stash)));
|
||||
}
|
||||
|
||||
Irssi::Log
|
||||
log_create_rec(fname, level, items)
|
||||
char *fname
|
||||
int level
|
||||
char *items
|
||||
|
||||
Irssi::Log
|
||||
log_find(fname)
|
||||
char *fname
|
||||
|
||||
void
|
||||
log_write(item, level, str)
|
||||
char *item
|
||||
int level
|
||||
char *str
|
||||
|
||||
#*******************************
|
||||
MODULE = Irssi PACKAGE = Irssi::Log PREFIX = log_
|
||||
#*******************************
|
||||
|
||||
void
|
||||
values(log)
|
||||
Irssi::Log log
|
||||
PREINIT:
|
||||
HV *hv;
|
||||
AV *av;
|
||||
char **tmp;
|
||||
PPCODE:
|
||||
hv = newHV();
|
||||
hv_store(hv, "fname", 5, new_pv(log->fname), 0);
|
||||
hv_store(hv, "opened", 6, newSViv(log->opened), 0);
|
||||
hv_store(hv, "level", 5, newSViv(log->level), 0);
|
||||
hv_store(hv, "last", 4, newSViv(log->last), 0);
|
||||
hv_store(hv, "autoopen", 8, newSViv(log->autoopen), 0);
|
||||
hv_store(hv, "temp", 4, newSViv(log->temp), 0);
|
||||
|
||||
av = newAV();
|
||||
for (tmp = log->items; *tmp != NULL; tmp++) {
|
||||
av_push(av, new_pv(*tmp));
|
||||
}
|
||||
hv_store(hv, "items", 4, newRV_noinc((SV*)av), 0);
|
||||
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
|
||||
|
||||
void
|
||||
log_update(log)
|
||||
Irssi::Log log
|
||||
|
||||
void
|
||||
log_close(log)
|
||||
Irssi::Log log
|
||||
|
||||
void
|
||||
log_write_rec(log, str)
|
||||
Irssi::Log log
|
||||
char *str
|
||||
|
||||
void
|
||||
log_start_logging(log)
|
||||
Irssi::Log log
|
||||
|
||||
void
|
||||
log_stop_logging(log)
|
||||
Irssi::Log log
|
||||
Loading…
Add table
Add a link
Reference in a new issue