[perl-Glib-Object-Introspection] Allow undef for callback user data
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-Object-Introspection] Allow undef for callback user data
- Date: Mon, 23 May 2011 21:24:24 +0000 (UTC)
commit e147134ee65237c8209cd9eca7d8800df75ad445
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Mon May 23 23:23:27 2011 +0200
Allow undef for callback user data
GObjectIntrospection.xs | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/GObjectIntrospection.xs b/GObjectIntrospection.xs
index 2e79cbc..b72b8f0 100644
--- a/GObjectIntrospection.xs
+++ b/GObjectIntrospection.xs
@@ -1219,8 +1219,10 @@ sv_to_arg (SV * sv,
memset (arg, 0, sizeof (GIArgument));
if (!gperl_sv_is_defined (sv))
- /* Interfaces need to be able to handle undef separately. */
- if (!may_be_null && tag != GI_TYPE_TAG_INTERFACE)
+ /* Interfaces and void types need to be able to handle undef
+ * separately. */
+ if (!may_be_null && tag != GI_TYPE_TAG_INTERFACE
+ && tag != GI_TYPE_TAG_VOID)
ccroak ("undefined value for mandatory argument '%s' encountered",
g_base_info_get_name ((GIBaseInfo *) arg_info));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]