From 7dbb8efdde3720fd15f06de088848259e24e3397 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Sun, 6 Nov 2011 20:47:00 +0100 Subject: get rid of PL_na --- src/perl/ui/Formats.xs | 2 +- src/perl/ui/Themes.xs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/perl/ui') diff --git a/src/perl/ui/Formats.xs b/src/perl/ui/Formats.xs index ba28f247..74add583 100644 --- a/src/perl/ui/Formats.xs +++ b/src/perl/ui/Formats.xs @@ -89,7 +89,7 @@ PREINIT: PPCODE: charargs = g_new0(char *, items-5+1); for (n = 5; n < items; n++) { - charargs[n-5] = (char *)SvPV(ST(n), PL_na); + charargs[n-5] = (char *)SvPV_nolen(ST(n)); } format_create_dest(&dest, server, target, 0, window); diff --git a/src/perl/ui/Themes.xs b/src/perl/ui/Themes.xs index ebc8b69b..772b25db 100644 --- a/src/perl/ui/Themes.xs +++ b/src/perl/ui/Themes.xs @@ -105,8 +105,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), PL_na); n++; - value = SvPV(*av_fetch(av, n, 0), PL_na); + key = SvPV_nolen(*av_fetch(av, n, 0)); n++; + value = SvPV_nolen(*av_fetch(av, n, 0)); formatrecs[fpos].tag = g_strdup(key); formatrecs[fpos].def = g_strdup(value); @@ -127,7 +127,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), PL_na); + arglist[n-2] = SvPV_nolen(ST(n)); } printformat_perl(&dest, format, arglist); @@ -148,8 +148,8 @@ CODE: croak("abstracts list is invalid - not divisible by 2 (%d)", len); for (i = 0; i < len; i++) { - key = SvPV(*av_fetch(av, i, 0), PL_na); i++; - value = SvPV(*av_fetch(av, i, 0), PL_na); + key = SvPV_nolen(*av_fetch(av, i, 0)); i++; + value = SvPV_nolen(*av_fetch(av, i, 0)); theme_set_default_abstract(key, value); } @@ -176,7 +176,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), PL_na); + arglist[n-4] = SvPV_nolen(ST(n)); } printformat_perl(&dest, format, arglist); @@ -198,7 +198,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), PL_na); + arglist[n-3] = SvPV_nolen(ST(n)); } printformat_perl(&dest, format, arglist); @@ -220,7 +220,7 @@ CODE: format_create_dest(&dest, item->server, item->visible_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), PL_na); + arglist[n-3] = SvPV_nolen(ST(n)); } printformat_perl(&dest, format, arglist); -- cgit v1.2.3 From f58a461c54f2189543d64303e8c80bacda78448d Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Wed, 25 Jun 2014 03:17:03 +0200 Subject: cleanup char* casts and replace one useless SvPV with SvPV_nolen --- src/perl/ui/Formats.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/perl/ui') diff --git a/src/perl/ui/Formats.xs b/src/perl/ui/Formats.xs index 74add583..c16aa5a0 100644 --- a/src/perl/ui/Formats.xs +++ b/src/perl/ui/Formats.xs @@ -89,7 +89,7 @@ PREINIT: PPCODE: charargs = g_new0(char *, items-5+1); for (n = 5; n < items; n++) { - charargs[n-5] = (char *)SvPV_nolen(ST(n)); + charargs[n-5] = SvPV_nolen(ST(n)); } format_create_dest(&dest, server, target, 0, window); -- cgit v1.2.3