mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
I always forget Perl 5.004 doesn't have PL_na .. so, now I've declared for
5.004, and changed all STRLEN n_a code to use PL_na instead. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2238 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d4ee6fd604
commit
617123b5d4
10 changed files with 21 additions and 35 deletions
|
|
@ -14,12 +14,11 @@ PREINIT:
|
|||
char **charargs;
|
||||
char *ret;
|
||||
int n;
|
||||
STRLEN n_a;
|
||||
PPCODE:
|
||||
charargs = g_new0(char *, items-5+1);
|
||||
charargs[items-5] = NULL;
|
||||
for (n = 5; n < items; n++) {
|
||||
charargs[n-5] = (char *)SvPV(ST(n), n_a);
|
||||
charargs[n-5] = (char *)SvPV(ST(n), PL_na);
|
||||
}
|
||||
ret = format_get_text(module, window, server, target, formatnum, charargs);
|
||||
g_free(charargs);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ void
|
|||
theme_register(formats)
|
||||
SV *formats
|
||||
PREINIT:
|
||||
STRLEN n_a;
|
||||
AV *av;
|
||||
FORMAT_REC *formatrecs;
|
||||
char *key, *value;
|
||||
|
|
@ -110,8 +109,8 @@ CODE:
|
|||
formatrecs[0].def = g_strdup("Perl script");
|
||||
|
||||
for (fpos = 1, n = 0; n < len; n++, fpos++) {
|
||||
key = SvPV(*av_fetch(av, n, 0), n_a); n++;
|
||||
value = SvPV(*av_fetch(av, n, 0), n_a);
|
||||
key = SvPV(*av_fetch(av, n, 0), PL_na); n++;
|
||||
value = SvPV(*av_fetch(av, n, 0), PL_na);
|
||||
|
||||
formatrecs[fpos].tag = g_strdup(key);
|
||||
formatrecs[fpos].def = g_strdup(value);
|
||||
|
|
@ -125,7 +124,6 @@ printformat(level, format, ...)
|
|||
int level
|
||||
char *format
|
||||
PREINIT:
|
||||
STRLEN n_a;
|
||||
TEXT_DEST_REC dest;
|
||||
char *arglist[MAX_FORMAT_PARAMS+1];
|
||||
int n;
|
||||
|
|
@ -133,7 +131,7 @@ CODE:
|
|||
format_create_dest(&dest, NULL, NULL, level, NULL);
|
||||
memset(arglist, 0, sizeof(arglist));
|
||||
for (n = 2; n < items && n < MAX_FORMAT_PARAMS+2; n++) {
|
||||
arglist[n-2] = SvPV(ST(n), n_a);
|
||||
arglist[n-2] = SvPV(ST(n), PL_na);
|
||||
}
|
||||
|
||||
printformat_perl(&dest, format, arglist);
|
||||
|
|
@ -149,7 +147,6 @@ printformat(server, target, level, format, ...)
|
|||
int level
|
||||
char *format
|
||||
PREINIT:
|
||||
STRLEN n_a;
|
||||
TEXT_DEST_REC dest;
|
||||
char *arglist[MAX_FORMAT_PARAMS+1];
|
||||
int n;
|
||||
|
|
@ -157,7 +154,7 @@ CODE:
|
|||
format_create_dest(&dest, server, target, level, NULL);
|
||||
memset(arglist, 0, sizeof(arglist));
|
||||
for (n = 4; n < items && n < MAX_FORMAT_PARAMS+4; n++) {
|
||||
arglist[n-4] = SvPV(ST(n), n_a);
|
||||
arglist[n-4] = SvPV(ST(n), PL_na);
|
||||
}
|
||||
|
||||
printformat_perl(&dest, format, arglist);
|
||||
|
|
@ -172,7 +169,6 @@ printformat(window, level, format, ...)
|
|||
int level
|
||||
char *format
|
||||
PREINIT:
|
||||
STRLEN n_a;
|
||||
TEXT_DEST_REC dest;
|
||||
char *arglist[MAX_FORMAT_PARAMS+1];
|
||||
int n;
|
||||
|
|
@ -180,7 +176,7 @@ CODE:
|
|||
format_create_dest(&dest, NULL, NULL, level, window);
|
||||
memset(arglist, 0, sizeof(arglist));
|
||||
for (n = 3; n < items && n < MAX_FORMAT_PARAMS+3; n++) {
|
||||
arglist[n-3] = SvPV(ST(n), n_a);
|
||||
arglist[n-3] = SvPV(ST(n), PL_na);
|
||||
}
|
||||
|
||||
printformat_perl(&dest, format, arglist);
|
||||
|
|
@ -195,7 +191,6 @@ printformat(item, level, format, ...)
|
|||
int level
|
||||
char *format
|
||||
PREINIT:
|
||||
STRLEN n_a;
|
||||
TEXT_DEST_REC dest;
|
||||
char *arglist[MAX_FORMAT_PARAMS+1];
|
||||
int n;
|
||||
|
|
@ -203,7 +198,7 @@ CODE:
|
|||
format_create_dest(&dest, item->server, item->name, level, NULL);
|
||||
memset(arglist, 0, sizeof(arglist));
|
||||
for (n = 3; n < items && n < MAX_FORMAT_PARAMS+3; n++) {
|
||||
arglist[n-3] = SvPV(ST(n), n_a);
|
||||
arglist[n-3] = SvPV(ST(n), PL_na);
|
||||
}
|
||||
|
||||
printformat_perl(&dest, format, arglist);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue