summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/network-openssl.c2
-rw-r--r--src/fe-common/core/window-items.c1
-rw-r--r--src/fe-common/irc/fe-whois.c2
-rw-r--r--src/irc/core/irc-session.c3
-rw-r--r--src/irc/proxy/listen.c1
-rw-r--r--src/perl/common/Channel.xs1
-rw-r--r--src/perl/common/Core.xs17
-rw-r--r--src/perl/common/Expando.xs5
-rw-r--r--src/perl/common/Ignore.xs1
-rw-r--r--src/perl/common/Irssi.xs1
-rw-r--r--src/perl/common/Log.xs1
-rw-r--r--src/perl/common/Masks.xs1
-rw-r--r--src/perl/common/Query.xs1
-rw-r--r--src/perl/common/Rawlog.xs1
-rw-r--r--src/perl/common/Server.xs1
-rw-r--r--src/perl/common/Settings.xs1
-rw-r--r--src/perl/irc/Channel.xs1
-rw-r--r--src/perl/irc/Client.xs1
-rw-r--r--src/perl/irc/Ctcp.xs1
-rw-r--r--src/perl/irc/Dcc.xs1
-rw-r--r--src/perl/irc/Irc.xs1
-rw-r--r--src/perl/irc/Modes.xs1
-rw-r--r--src/perl/irc/Netsplit.xs1
-rw-r--r--src/perl/irc/Notifylist.xs1
-rw-r--r--src/perl/irc/Query.xs1
-rw-r--r--src/perl/irc/Server.xs3
-rw-r--r--src/perl/perl-common.c5
-rw-r--r--src/perl/perl-core.c3
-rw-r--r--src/perl/perl-signals.c8
-rw-r--r--src/perl/perl-sources.c3
-rw-r--r--src/perl/textui/Statusbar.xs3
-rw-r--r--src/perl/textui/TextBuffer.xs1
-rw-r--r--src/perl/textui/TextBufferView.xs1
-rw-r--r--src/perl/textui/TextUI.xs1
-rw-r--r--src/perl/ui/Formats.xs3
-rw-r--r--src/perl/ui/Themes.xs17
-rw-r--r--src/perl/ui/UI.xs1
-rw-r--r--src/perl/ui/Window.xs1
38 files changed, 65 insertions, 34 deletions
diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c
index 6a0d078c..768fd540 100644
--- a/src/core/network-openssl.c
+++ b/src/core/network-openssl.c
@@ -477,7 +477,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_
}
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
SSL_CTX_set_default_passwd_cb(ctx, get_pem_password_callback);
- SSL_CTX_set_default_passwd_cb_userdata(ctx, mypass);
+ SSL_CTX_set_default_passwd_cb_userdata(ctx, (void *)mypass);
if (mycert && *mycert) {
char *scert = NULL, *spkey = NULL;
diff --git a/src/fe-common/core/window-items.c b/src/fe-common/core/window-items.c
index c29db9e6..bd6ae5e9 100644
--- a/src/fe-common/core/window-items.c
+++ b/src/fe-common/core/window-items.c
@@ -211,7 +211,6 @@ void window_item_next(WINDOW_REC *window)
WI_ITEM_REC *window_item_find_window(WINDOW_REC *window,
void *server, const char *name)
{
- CHANNEL_REC *channel;
GSList *tmp;
for (tmp = window->items; tmp != NULL; tmp = tmp->next) {
diff --git a/src/fe-common/irc/fe-whois.c b/src/fe-common/irc/fe-whois.c
index e48c99c6..c5726124 100644
--- a/src/fe-common/irc/fe-whois.c
+++ b/src/fe-common/irc/fe-whois.c
@@ -242,7 +242,7 @@ static void hide_safe_channel_id(IRC_SERVER_REC *server, char *chans)
if (idchan == NULL)
return;
}
- nick_flags = server->get_nick_flags(server);
+ nick_flags = server->get_nick_flags(SERVER(server));
while (*idchan != '\0') {
id = *idchan;
diff --git a/src/irc/core/irc-session.c b/src/irc/core/irc-session.c
index 3c50e312..bcb0a122 100644
--- a/src/irc/core/irc-session.c
+++ b/src/irc/core/irc-session.c
@@ -115,7 +115,6 @@ static void sig_session_restore_nick(IRC_CHANNEL_REC *channel,
{
const char *nick, *prefixes;
int op, halfop, voice;
- NICK_REC *nickrec;
char newprefixes[MAX_USER_PREFIXES + 1];
int i;
@@ -145,7 +144,7 @@ static void sig_session_restore_nick(IRC_CHANNEL_REC *channel,
newprefixes[i] = '\0';
prefixes = newprefixes;
}
- nickrec = irc_nicklist_insert(channel, nick, op, halfop, voice, FALSE, prefixes);
+ irc_nicklist_insert(channel, nick, op, halfop, voice, FALSE, prefixes);
}
static void session_restore_channel(IRC_CHANNEL_REC *channel)
diff --git a/src/irc/proxy/listen.c b/src/irc/proxy/listen.c
index 5dfd46db..8edffbd3 100644
--- a/src/irc/proxy/listen.c
+++ b/src/irc/proxy/listen.c
@@ -24,6 +24,7 @@
#include "servers-redirect.h"
#include "levels.h"
#include "settings.h"
+#include "misc.h"
#include "irc.h"
#include "irc-channels.h"
diff --git a/src/perl/common/Channel.xs b/src/perl/common/Channel.xs
index 0692a7cc..69141c7c 100644
--- a/src/perl/common/Channel.xs
+++ b/src/perl/common/Channel.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Channel PACKAGE = Irssi
diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs
index 76ea0093..bfe2efde 100644
--- a/src/perl/common/Core.xs
+++ b/src/perl/common/Core.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "irssi-version.h"
#include "core.h"
@@ -48,11 +49,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);
+ SvPV_nolen(p2);
+ perl_command_bind_to(SvPV_nolen(p0), category, p1, priority);
} else {
category = items < 2 ? DEFAULT_COMMAND_CATEGORY :
- (char *)SvPV(p1, PL_na);
+ SvPV_nolen(p1);
perl_command_bind_add_hash(priority, p0, category);
}
}
@@ -116,7 +117,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(SvPV_nolen(ST(0)), ST(1),
SIGNAL_PRIORITY_DEFAULT);
else
perl_signal_add_hash(SIGNAL_PRIORITY_DEFAULT, ST(0));
@@ -127,7 +128,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(SvPV_nolen(ST(0)), ST(1),
SIGNAL_PRIORITY_HIGH);
else
perl_signal_add_hash(SIGNAL_PRIORITY_HIGH, ST(0));
@@ -138,7 +139,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(SvPV_nolen(ST(0)), ST(1),
SIGNAL_PRIORITY_LOW);
else
perl_signal_add_hash(SIGNAL_PRIORITY_LOW, ST(0));
@@ -149,7 +150,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(SvPV_nolen(ST(0)), ST(1), SvIV(ST(2)));
else
perl_signal_add_hash(SvIV(ST(0)), ST(1));
@@ -179,7 +180,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..375a4c2f 100644
--- a/src/perl/common/Expando.xs
+++ b/src/perl/common/Expando.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "expandos.h"
@@ -77,7 +78,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 +118,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/common/Ignore.xs b/src/perl/common/Ignore.xs
index e4452c78..8dfd0ad3 100644
--- a/src/perl/common/Ignore.xs
+++ b/src/perl/common/Ignore.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Ignore PACKAGE = Irssi
diff --git a/src/perl/common/Irssi.xs b/src/perl/common/Irssi.xs
index 9f33d557..dc354bbd 100644
--- a/src/perl/common/Irssi.xs
+++ b/src/perl/common/Irssi.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
static int initialized = FALSE;
diff --git a/src/perl/common/Log.xs b/src/perl/common/Log.xs
index c87ee45b..cdcdbd90 100644
--- a/src/perl/common/Log.xs
+++ b/src/perl/common/Log.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Log PACKAGE = Irssi
diff --git a/src/perl/common/Masks.xs b/src/perl/common/Masks.xs
index 1ea13969..9612911a 100644
--- a/src/perl/common/Masks.xs
+++ b/src/perl/common/Masks.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Masks PACKAGE = Irssi
diff --git a/src/perl/common/Query.xs b/src/perl/common/Query.xs
index 54a0582c..9d8cd523 100644
--- a/src/perl/common/Query.xs
+++ b/src/perl/common/Query.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Query PACKAGE = Irssi
diff --git a/src/perl/common/Rawlog.xs b/src/perl/common/Rawlog.xs
index dd95ce50..c405bc37 100644
--- a/src/perl/common/Rawlog.xs
+++ b/src/perl/common/Rawlog.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Rawlog PACKAGE = Irssi
diff --git a/src/perl/common/Server.xs b/src/perl/common/Server.xs
index 76ea7812..7ed41109 100644
--- a/src/perl/common/Server.xs
+++ b/src/perl/common/Server.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Server PACKAGE = Irssi
diff --git a/src/perl/common/Settings.xs b/src/perl/common/Settings.xs
index dc5507cf..eb81b627 100644
--- a/src/perl/common/Settings.xs
+++ b/src/perl/common/Settings.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "misc.h"
diff --git a/src/perl/irc/Channel.xs b/src/perl/irc/Channel.xs
index 828e8cca..782fa1d5 100644
--- a/src/perl/irc/Channel.xs
+++ b/src/perl/irc/Channel.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Irc::Channel PACKAGE = Irssi::Irc PREFIX = irc_
diff --git a/src/perl/irc/Client.xs b/src/perl/irc/Client.xs
index 8481a11e..05616af2 100644
--- a/src/perl/irc/Client.xs
+++ b/src/perl/irc/Client.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Irc::Client PACKAGE = Irssi::Irc
diff --git a/src/perl/irc/Ctcp.xs b/src/perl/irc/Ctcp.xs
index f298a2a4..d1bf8ba4 100644
--- a/src/perl/irc/Ctcp.xs
+++ b/src/perl/irc/Ctcp.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "ctcp.h"
diff --git a/src/perl/irc/Dcc.xs b/src/perl/irc/Dcc.xs
index eff4e982..c078a1b5 100644
--- a/src/perl/irc/Dcc.xs
+++ b/src/perl/irc/Dcc.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Irc::Dcc PACKAGE = Irssi::Irc
diff --git a/src/perl/irc/Irc.xs b/src/perl/irc/Irc.xs
index 251efb8b..22a87384 100644
--- a/src/perl/irc/Irc.xs
+++ b/src/perl/irc/Irc.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
static int initialized = FALSE;
diff --git a/src/perl/irc/Modes.xs b/src/perl/irc/Modes.xs
index 4f355ce0..a53391b3 100644
--- a/src/perl/irc/Modes.xs
+++ b/src/perl/irc/Modes.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Irc::Modes PACKAGE = Irssi::Irc
diff --git a/src/perl/irc/Netsplit.xs b/src/perl/irc/Netsplit.xs
index b0b1e523..9fafaf74 100644
--- a/src/perl/irc/Netsplit.xs
+++ b/src/perl/irc/Netsplit.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Irc::Netsplit PACKAGE = Irssi::Irc::Server
diff --git a/src/perl/irc/Notifylist.xs b/src/perl/irc/Notifylist.xs
index 192489cc..74747baa 100644
--- a/src/perl/irc/Notifylist.xs
+++ b/src/perl/irc/Notifylist.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Irc::Notifylist PACKAGE = Irssi::Irc
diff --git a/src/perl/irc/Query.xs b/src/perl/irc/Query.xs
index a4f6bd03..e873d9a5 100644
--- a/src/perl/irc/Query.xs
+++ b/src/perl/irc/Query.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::Irc::Query PACKAGE = Irssi::Irc::Server PREFIX = irc_
diff --git a/src/perl/irc/Server.xs b/src/perl/irc/Server.xs
index a330fb20..0e9ec672 100644
--- a/src/perl/irc/Server.xs
+++ b/src/perl/irc/Server.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
static GSList *register_hash2list(HV *hv)
@@ -34,7 +35,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..c5037ba6 100644
--- a/src/perl/perl-common.c
+++ b/src/perl/perl-common.c
@@ -19,6 +19,7 @@
*/
#define NEED_PERL_H
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "modules.h"
#include "signals.h"
@@ -54,7 +55,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 +82,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));
+ 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 c487c393..ee0c845e 100644
--- a/src/perl/perl-core.c
+++ b/src/perl/perl-core.c
@@ -19,6 +19,7 @@
*/
#define NEED_PERL_H
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "modules.h"
#include "core.h"
@@ -237,7 +238,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..d0670ba2 100644
--- a/src/perl/perl-signals.c
+++ b/src/perl/perl-signals.c
@@ -19,6 +19,7 @@
*/
#define NEED_PERL_H
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "modules.h"
#include "signals.h"
@@ -302,7 +303,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;
@@ -323,7 +324,6 @@ static void perl_call_signal(PERL_SCRIPT_REC *script, SV *func,
GList **ret = arg;
GList *out = NULL;
void *val;
- STRLEN len;
int count;
av = (AV *) SvRV(saved_args[n]);
@@ -331,7 +331,7 @@ static void perl_call_signal(PERL_SCRIPT_REC *script, SV *func,
while (count-- >= 0) {
sv = av_shift(av);
if (SvPOKp(sv))
- val = g_strdup(SvPV(sv, len));
+ val = g_strdup(SvPV_nolen(sv));
else
val = GINT_TO_POINTER(SvIV(sv));
@@ -435,7 +435,7 @@ static void perl_signal_remove_list_one(GSList **siglist, PERL_SIGNAL_REC *rec)
#define sv_func_cmp(f1, f2) \
(f1 == f2 || (SvPOK(f1) && SvPOK(f2) && \
- strcmp((char *) SvPV_nolen(f1), (char *) SvPV_nolen(f2)) == 0))
+ strcmp(SvPV_nolen(f1), SvPV_nolen(f2)) == 0))
static void perl_signal_remove_list(GSList **list, SV *func)
{
diff --git a/src/perl/perl-sources.c b/src/perl/perl-sources.c
index 1697dbd2..33fe6dd1 100644
--- a/src/perl/perl-sources.c
+++ b/src/perl/perl-sources.c
@@ -19,6 +19,7 @@
*/
#define NEED_PERL_H
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "signals.h"
@@ -82,7 +83,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..d1241ae1 100644
--- a/src/perl/textui/Statusbar.xs
+++ b/src/perl/textui/Statusbar.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
static GHashTable *perl_sbar_defs;
@@ -77,7 +78,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/textui/TextBuffer.xs b/src/perl/textui/TextBuffer.xs
index 0a0fe0d1..14ef5950 100644
--- a/src/perl/textui/TextBuffer.xs
+++ b/src/perl/textui/TextBuffer.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::TextUI::TextBuffer PACKAGE = Irssi
diff --git a/src/perl/textui/TextBufferView.xs b/src/perl/textui/TextBufferView.xs
index 4d755494..6e49e453 100644
--- a/src/perl/textui/TextBufferView.xs
+++ b/src/perl/textui/TextBufferView.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
MODULE = Irssi::TextUI::TextBufferView PACKAGE = Irssi::TextUI::TextBuffer PREFIX = textbuffer_
diff --git a/src/perl/textui/TextUI.xs b/src/perl/textui/TextUI.xs
index 84320ffa..fe51076a 100644
--- a/src/perl/textui/TextUI.xs
+++ b/src/perl/textui/TextUI.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
void perl_statusbar_init(void);
diff --git a/src/perl/ui/Formats.xs b/src/perl/ui/Formats.xs
index ba28f247..c10f0b4e 100644
--- a/src/perl/ui/Formats.xs
+++ b/src/perl/ui/Formats.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
static int magic_free_text_dest(pTHX_ SV *sv, MAGIC *mg)
@@ -89,7 +90,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] = 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..dc5f6272 100644
--- a/src/perl/ui/Themes.xs
+++ b/src/perl/ui/Themes.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
static void printformat_perl(TEXT_DEST_REC *dest, char *format, char **arglist)
@@ -105,8 +106,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 +128,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 +149,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 +177,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 +199,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 +221,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);
diff --git a/src/perl/ui/UI.xs b/src/perl/ui/UI.xs
index d8c7f7ae..2e32762c 100644
--- a/src/perl/ui/UI.xs
+++ b/src/perl/ui/UI.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
void perl_themes_init(void);
diff --git a/src/perl/ui/Window.xs b/src/perl/ui/Window.xs
index ea3735a6..8c994cc2 100644
--- a/src/perl/ui/Window.xs
+++ b/src/perl/ui/Window.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "module.h"
#include "window-activity.h"