From 2de5b40ac542f80215a11418c81b75453479e89e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 16 Aug 2000 00:26:07 +0000 Subject: [PATCH] More fixes for 5.004 and older. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@611 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/xs/Irssi-core.xs | 4 +++- src/perl/xs/Irssi-server.xs | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/perl/xs/Irssi-core.xs b/src/perl/xs/Irssi-core.xs index d8a87c50..bac9e90b 100644 --- a/src/perl/xs/Irssi-core.xs +++ b/src/perl/xs/Irssi-core.xs @@ -3,13 +3,15 @@ MODULE = Irssi PACKAGE = Irssi void signal_emit(signal, ...) char *signal +PREINIT: + STRLEN n_a; CODE: void *p[6]; int n; memset(p, 0, sizeof(p)); 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]); diff --git a/src/perl/xs/Irssi-server.xs b/src/perl/xs/Irssi-server.xs index f53527ec..e88b8895 100644 --- a/src/perl/xs/Irssi-server.xs +++ b/src/perl/xs/Irssi-server.xs @@ -115,12 +115,13 @@ server_redirect_init(server, command, last, ...) char *command int last PREINIT: + STRLEN n_a; GSList *list; int n; CODE: list = NULL; 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); @@ -140,12 +141,13 @@ server_redirect_event(server, arg, last, ...) char *arg int last PREINIT: + STRLEN n_a; int n, group; CODE: group = 0; for (n = 3; n+3 <= items; n += 3, last--) { 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))); } #*******************************