[perl-Glib-Object-Introspection] Convert invalid or void GTypes to undef
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-Object-Introspection] Convert invalid or void GTypes to undef
- Date: Sun, 4 Nov 2012 19:03:36 +0000 (UTC)
commit fea585f686149ef4e17a74c4333fd447826ab7ac
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Sun Nov 4 20:00:43 2012 +0100
Convert invalid or void GTypes to undef
NEWS | 5 +++++
gperl-i11n-marshal-arg.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3d8747f..9dc8fca 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Overview of changes in Glib::Object::Introspection <next>
+========================================================
+
+* Convert invalid or void GTypes to undef.
+
Overview of changes in Glib::Object::Introspection 0.012
========================================================
diff --git a/gperl-i11n-marshal-arg.c b/gperl-i11n-marshal-arg.c
index 4e679a6..f1a12e8 100644
--- a/gperl-i11n-marshal-arg.c
+++ b/gperl-i11n-marshal-arg.c
@@ -197,7 +197,10 @@ arg_to_sv (GIArgument * arg,
case GI_TYPE_TAG_GTYPE: {
/* GType == gsize */
- const char *package = gperl_package_from_type (arg->v_size);
+ const char *package;
+ if (G_TYPE_INVALID == arg->v_size || G_TYPE_NONE == arg->v_size)
+ return &PL_sv_undef;
+ package = gperl_package_from_type (arg->v_size);
if (!package)
package = g_type_name (arg->v_size);
if (!package)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]