mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
get rid of PL_na
This commit is contained in:
parent
c26a634fe6
commit
7dbb8efdde
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user