mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
More fixes for 5.004 and older.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@611 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
337d34fe54
commit
2de5b40ac5
src/perl/xs
@ -3,13 +3,15 @@ MODULE = Irssi PACKAGE = Irssi
|
|||||||
void
|
void
|
||||||
signal_emit(signal, ...)
|
signal_emit(signal, ...)
|
||||||
char *signal
|
char *signal
|
||||||
|
PREINIT:
|
||||||
|
STRLEN n_a;
|
||||||
CODE:
|
CODE:
|
||||||
void *p[6];
|
void *p[6];
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
memset(p, 0, sizeof(p));
|
memset(p, 0, sizeof(p));
|
||||||
for (n = 1; n < items && n < 6; n++) {
|
for (n = 1; n < items && n < 6; n++) {
|
||||||
p[n-1] = SvPOKp(ST(n)) ? SvPV(ST(n), PL_na) : (void *) SvIV((SV*)SvRV(ST(n)));
|
p[n-1] = SvPOKp(ST(n)) ? SvPV(ST(n), n_a) : (void *) SvIV((SV*)SvRV(ST(n)));
|
||||||
}
|
}
|
||||||
signal_emit(signal, items-1, p[0], p[1], p[2], p[3], p[4], p[5]);
|
signal_emit(signal, items-1, p[0], p[1], p[2], p[3], p[4], p[5]);
|
||||||
|
|
||||||
|
@ -115,12 +115,13 @@ server_redirect_init(server, command, last, ...)
|
|||||||
char *command
|
char *command
|
||||||
int last
|
int last
|
||||||
PREINIT:
|
PREINIT:
|
||||||
|
STRLEN n_a;
|
||||||
GSList *list;
|
GSList *list;
|
||||||
int n;
|
int n;
|
||||||
CODE:
|
CODE:
|
||||||
list = NULL;
|
list = NULL;
|
||||||
for (n = 3; n < items; n++) {
|
for (n = 3; n < items; n++) {
|
||||||
list = g_slist_append(list, SvPV(ST(n), PL_na));
|
list = g_slist_append(list, SvPV(ST(n), n_a));
|
||||||
}
|
}
|
||||||
server_redirect_initv(server, command, last, list);
|
server_redirect_initv(server, command, last, list);
|
||||||
|
|
||||||
@ -140,12 +141,13 @@ server_redirect_event(server, arg, last, ...)
|
|||||||
char *arg
|
char *arg
|
||||||
int last
|
int last
|
||||||
PREINIT:
|
PREINIT:
|
||||||
|
STRLEN n_a;
|
||||||
int n, group;
|
int n, group;
|
||||||
CODE:
|
CODE:
|
||||||
group = 0;
|
group = 0;
|
||||||
for (n = 3; n+3 <= items; n += 3, last--) {
|
for (n = 3; n+3 <= items; n += 3, last--) {
|
||||||
group = server_redirect_single_event(server, arg, last > 0, group,
|
group = server_redirect_single_event(server, arg, last > 0, group,
|
||||||
(char *) SvPV(ST(n), PL_na), (char *) SvPV(ST(n+1), PL_na), (int) SvIV(ST(n+2)));
|
(char *) SvPV(ST(n), n_a), (char *) SvPV(ST(n+1), n_a), (int) SvIV(ST(n+2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#*******************************
|
#*******************************
|
||||||
|
Loading…
Reference in New Issue
Block a user