diff options
author | Lukas Mai <l.mai@web.de> | 2011-11-06 20:47:00 +0100 |
---|---|---|
committer | Ailin Nemui <ailin@esf51.localdomain> | 2014-06-24 16:45:55 +0200 |
commit | 7dbb8efdde3720fd15f06de088848259e24e3397 (patch) | |
tree | a9089a585049399bfca289b5fe89f0642e86c1bd /src | |
parent | c26a634fe6f65f44cdd036d2657fe4335ed6e309 (diff) | |
download | irssi-7dbb8efdde3720fd15f06de088848259e24e3397.zip |
get rid of PL_na
Diffstat (limited to 'src')
-rw-r--r-- | src/perl/common/Core.xs | 16 | ||||
-rw-r--r-- | src/perl/common/Expando.xs | 4 | ||||
-rw-r--r-- | src/perl/irc/Server.xs | 2 | ||||
-rw-r--r-- | src/perl/perl-common.c | 4 | ||||
-rw-r--r-- | src/perl/perl-core.c | 2 | ||||
-rw-r--r-- | src/perl/perl-signals.c | 2 | ||||
-rw-r--r-- | src/perl/perl-sources.c | 2 | ||||
-rw-r--r-- | src/perl/textui/Statusbar.xs | 2 | ||||
-rw-r--r-- | src/perl/ui/Formats.xs | 2 | ||||
-rw-r--r-- | src/perl/ui/Themes.xs | 16 |
10 files changed, 26 insertions, 26 deletions
diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs index 76ea0093..719c0303 100644 --- a/src/perl/common/Core.xs +++ b/src/perl/common/Core.xs @@ -48,11 +48,11 @@ static void handle_command_bind(int priority, int items, SV *p0, SV *p1, SV *p2) if (!hash) { category = items < 3 ? DEFAULT_COMMAND_CATEGORY : - (char *)SvPV(p2, PL_na); - perl_command_bind_to((char *)SvPV(p0, PL_na), category, p1, priority); + (char *)SvPV_nolen(p2); + perl_command_bind_to((char *)SvPV_nolen(p0), category, p1, priority); } else { category = items < 2 ? DEFAULT_COMMAND_CATEGORY : - (char *)SvPV(p1, PL_na); + (char *)SvPV_nolen(p1); perl_command_bind_add_hash(priority, p0, category); } } @@ -116,7 +116,7 @@ CODE: if (items != 1 && items != 2) croak("Usage: Irssi::signal_add(signal, func)"); if (items == 2) - perl_signal_add_full((char *)SvPV(ST(0),PL_na), ST(1), + perl_signal_add_full((char *)SvPV_nolen(ST(0)), ST(1), SIGNAL_PRIORITY_DEFAULT); else perl_signal_add_hash(SIGNAL_PRIORITY_DEFAULT, ST(0)); @@ -127,7 +127,7 @@ CODE: if (items != 1 && items != 2) croak("Usage: Irssi::signal_add_first(signal, func)"); if (items == 2) - perl_signal_add_full((char *)SvPV(ST(0),PL_na), ST(1), + perl_signal_add_full((char *)SvPV_nolen(ST(0)), ST(1), SIGNAL_PRIORITY_HIGH); else perl_signal_add_hash(SIGNAL_PRIORITY_HIGH, ST(0)); @@ -138,7 +138,7 @@ CODE: if (items != 1 && items != 2) croak("Usage: Irssi::signal_add_last(signal, func)"); if (items == 2) - perl_signal_add_full((char *)SvPV(ST(0),PL_na), ST(1), + perl_signal_add_full((char *)SvPV_nolen(ST(0)), ST(1), SIGNAL_PRIORITY_LOW); else perl_signal_add_hash(SIGNAL_PRIORITY_LOW, ST(0)); @@ -149,7 +149,7 @@ CODE: if (items != 2 && items != 3) croak("Usage: Irssi::signal_add_priority(signal, func, priority)"); if (items == 3) - perl_signal_add_full((char *)SvPV(ST(0),PL_na), ST(1), SvIV(ST(2))); + perl_signal_add_full((char *)SvPV_nolen(ST(0)), ST(1), SvIV(ST(2))); else perl_signal_add_hash(SvIV(ST(0)), ST(1)); @@ -179,7 +179,7 @@ CODE: if (len > 6) len = 6; for (pos = 0; pos < len; pos++) { SV **val = av_fetch(av, pos, 0); - arr[pos] = SvPV(*val, PL_na); + arr[pos] = SvPV_nolen(*val); } arr[pos] = NULL; perl_signal_register(key, arr); diff --git a/src/perl/common/Expando.xs b/src/perl/common/Expando.xs index 31b4f990..10d85d24 100644 --- a/src/perl/common/Expando.xs +++ b/src/perl/common/Expando.xs @@ -77,7 +77,7 @@ static char *perl_expando_event(PerlExpando *rec, SERVER_REC *server, if (rec->script != NULL) script_unregister_expandos(rec->script); - signal_emit("script error", 2, rec->script, SvPV(ERRSV, PL_na)); + signal_emit("script error", 2, rec->script, SvPV_nolen(ERRSV)); } else if (retcount > 0) { ret = g_strdup(POPp); *free_ret = TRUE; @@ -117,7 +117,7 @@ static void expando_signals_add_hash(const char *key, SV *signals) hv_iterinit(hv); while ((he = hv_iternext(hv)) != NULL) { SV *argsv = HeVAL(he); - argstr = SvPV(argsv, PL_na); + argstr = SvPV_nolen(argsv); if (g_ascii_strcasecmp(argstr, "none") == 0) arg = EXPANDO_ARG_NONE; diff --git a/src/perl/irc/Server.xs b/src/perl/irc/Server.xs index a330fb20..854a2a54 100644 --- a/src/perl/irc/Server.xs +++ b/src/perl/irc/Server.xs @@ -34,7 +34,7 @@ static GSList *event_hash2list(HV *hv) while ((he = hv_iternext(hv)) != NULL) { I32 len; char *key = hv_iterkey(he, &len); - char *value = SvPV(HeVAL(he), PL_na); + char *value = SvPV_nolen(HeVAL(he)); list = g_slist_append(list, g_strdup(key)); list = g_slist_append(list, g_strdup(value)); diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index 198da57d..12df78f7 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -54,7 +54,7 @@ static GSList *use_protocols; /* returns the package who called us */ const char *perl_get_package(void) { - return SvPV(perl_eval_pv("caller", TRUE), PL_na); + return SvPV_nolen(perl_eval_pv("caller", TRUE)); } /* Parses the package part from function name */ @@ -81,7 +81,7 @@ SV *perl_func_sv_inc(SV *func, const char *package) if (SvPOK(func)) { /* prefix with package name */ name = g_strdup_printf("%s::%s", package, - (char *) SvPV(func, PL_na)); + (char *) SvPV_nolen(func)); func = new_pv(name); g_free(name); } else { diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index 08d0738c..226be969 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -237,7 +237,7 @@ static int perl_script_eval(PERL_SCRIPT_REC *script) error = NULL; if (SvTRUE(ERRSV)) { - error = SvPV(ERRSV, PL_na); + error = SvPV_nolen(ERRSV); if (error != NULL) { error = g_strdup(error); diff --git a/src/perl/perl-signals.c b/src/perl/perl-signals.c index a455cfd3..02716b2f 100644 --- a/src/perl/perl-signals.c +++ b/src/perl/perl-signals.c @@ -302,7 +302,7 @@ static void perl_call_signal(PERL_SCRIPT_REC *script, SV *func, SPAGAIN; if (SvTRUE(ERRSV)) { - char *error = g_strdup(SvPV(ERRSV, PL_na)); + char *error = g_strdup(SvPV_nolen(ERRSV)); signal_emit("script error", 2, script, error); g_free(error); rec = NULL; diff --git a/src/perl/perl-sources.c b/src/perl/perl-sources.c index 1697dbd2..fddaa995 100644 --- a/src/perl/perl-sources.c +++ b/src/perl/perl-sources.c @@ -82,7 +82,7 @@ static int perl_source_event(PERL_SOURCE_REC *rec) SPAGAIN; if (SvTRUE(ERRSV)) { - char *error = g_strdup(SvPV(ERRSV, PL_na)); + char *error = g_strdup(SvPV_nolen(ERRSV)); signal_emit("script error", 2, rec->script, error); g_free(error); } diff --git a/src/perl/textui/Statusbar.xs b/src/perl/textui/Statusbar.xs index 522a93ee..3fc43632 100644 --- a/src/perl/textui/Statusbar.xs +++ b/src/perl/textui/Statusbar.xs @@ -77,7 +77,7 @@ static void perl_statusbar_event(char *function, SBAR_ITEM_REC *item, /* make sure we don't get back here */ script_unregister_statusbars(script); } - signal_emit("script error", 2, script, SvPV(ERRSV, PL_na)); + signal_emit("script error", 2, script, SvPV_nolen(ERRSV)); } else { /* min_size and max_size can be changed, move them to SBAR_ITEM_REC */ hv = hvref(item_sv); 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); |