[perl-Gtk2] Avoid misusing PL_na
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Avoid misusing PL_na
- Date: Wed, 25 Sep 2013 18:35:38 +0000 (UTC)
commit 6ad3df0f4cd3c65500f8815eb8381fc4a51a02b6
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Wed Sep 25 20:34:43 2013 +0200
Avoid misusing PL_na
NEWS | 7 +++++++
lib/Gtk2/CodeGen.pm | 4 ++--
xs/GdkProperty.xs | 2 +-
xs/GtkFileFilter.xs | 2 +-
xs/GtkRecentFilter.xs | 2 +-
xs/GtkTooltips.xs | 4 ++--
6 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/NEWS b/NEWS
index 9c88fad..0a20bba 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+Overview of changes in Gtk2 <next>
+=================================
+
+* Avoid misusing the macro PL_na, thus preventing issues when Gtk2 is used in
+ conjunction with certain XS modules, among them XML::Parser and
+ String::Approx.
+
Overview of changes in Gtk2 1.247
=================================
diff --git a/lib/Gtk2/CodeGen.pm b/lib/Gtk2/CodeGen.pm
index 1a9293e..8ffbb79 100644
--- a/lib/Gtk2/CodeGen.pm
+++ b/lib/Gtk2/CodeGen.pm
@@ -292,7 +292,7 @@ That is, the constant's name optionally followed by a tab and the converter
that is to be used to convert the constant to a Perl scalar. If
CONSTANT_CONVERTER is a simple string like 'newSViv' it will be used as follows
to get a Perl scalar: CONSTANT_CONVERTER (CONSTANT_NAME). If it contains
-'$var', as in 'newSVpv ($var, PL_na)', then '$var' will be replaced with
+'$var', as in 'newSVpv ($var, 0)', then '$var' will be replaced with
CONSTANT_NAME and the resulting string will be used for conversion.
The default for CONSTANT_CONVERTER is 'newSViv'.
@@ -364,7 +364,7 @@ __EOD__
$boot_code .= <<"__EOD__";
newCONSTSUB (stash, "$constant", $conversion);
- av_push (constants_av, newSVpv ("$constant", PL_na));
+ av_push (constants_av, newSVpv ("$constant", 0));
__EOD__
}
diff --git a/xs/GdkProperty.xs b/xs/GdkProperty.xs
index 68ebade..b47e6d0 100644
--- a/xs/GdkProperty.xs
+++ b/xs/GdkProperty.xs
@@ -38,7 +38,7 @@
EXTEND (sp, elements); \
\
for (i = 0; i < elements; i++) \
- PUSHs (sv_2mortal (newSVpv (list[i], PL_na)));
+ PUSHs (sv_2mortal (newSVpv (list[i], 0)));
/* ------------------------------------------------------------------------- */
diff --git a/xs/GtkFileFilter.xs b/xs/GtkFileFilter.xs
index 65bcd07..de173e3 100644
--- a/xs/GtkFileFilter.xs
+++ b/xs/GtkFileFilter.xs
@@ -38,7 +38,7 @@ newSVGtkFileFilterInfo (const GtkFileFilterInfo * info)
gperl_sv_from_filename (info->filename));
if (info->uri)
gperl_hv_take_sv_s (hv, "uri",
- newSVpv (info->uri, PL_na));
+ newSVpv (info->uri, 0));
if (info->display_name)
gperl_hv_take_sv_s (hv, "display_name",
newSVGChar (info->display_name));
diff --git a/xs/GtkRecentFilter.xs b/xs/GtkRecentFilter.xs
index 3995ad8..d7624d4 100644
--- a/xs/GtkRecentFilter.xs
+++ b/xs/GtkRecentFilter.xs
@@ -40,7 +40,7 @@ newSVGtkRecentFilterInfo (const GtkRecentFilterInfo *info)
newSVGtkRecentFilterFlags (info->contains));
if (info->uri)
- gperl_hv_take_sv_s (hv, "uri", newSVpv (info->uri, PL_na));
+ gperl_hv_take_sv_s (hv, "uri", newSVpv (info->uri, 0));
if (info->display_name)
gperl_hv_take_sv_s (hv, "display_name", newSVGChar (info->display_name));
diff --git a/xs/GtkTooltips.xs b/xs/GtkTooltips.xs
index 8cb6de4..ae7f37b 100644
--- a/xs/GtkTooltips.xs
+++ b/xs/GtkTooltips.xs
@@ -92,9 +92,9 @@ gtk_tooltips_data_get (class, widget)
if (ret->widget)
gperl_hv_take_sv_s(hv, "widget", newSVGtkWidget(GTK_WIDGET(ret->widget)));
if (ret->tip_text)
- gperl_hv_take_sv_s(hv, "tip_text", newSVpv(ret->tip_text, PL_na));
+ gperl_hv_take_sv_s(hv, "tip_text", newSVpv(ret->tip_text, 0));
if (ret->tip_private)
- gperl_hv_take_sv_s(hv, "tip_private", newSVpv(ret->tip_private, PL_na));
+ gperl_hv_take_sv_s(hv, "tip_private", newSVpv(ret->tip_private, 0));
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]