=?utf-8?q?=5Bperl-Glib-Object-Introspection=5D_SV_=E2=86=92_object=3A_do_?= =?utf-8?q?some_type_checking?=
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-Object-Introspection] SV â object: do some type checking
- Date: Sun, 4 Nov 2012 19:03:41 +0000 (UTC)
commit c3c0c34a56fdacb611650fc018df19be7e91a12e
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Sun Nov 4 20:02:58 2012 +0100
SV â object: do some type checking
Do not silently turn invalid input into NULL.
gperl-i11n-marshal-interface.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gperl-i11n-marshal-interface.c b/gperl-i11n-marshal-interface.c
index d9634a7..7c3c852 100644
--- a/gperl-i11n-marshal-interface.c
+++ b/gperl-i11n-marshal-interface.c
@@ -71,7 +71,11 @@ sv_to_interface (GIArgInfo * arg_info,
switch (info_type) {
case GI_INFO_TYPE_OBJECT:
case GI_INFO_TYPE_INTERFACE:
- arg->v_pointer = gperl_get_object (sv);
+ if (may_be_null && !gperl_sv_is_defined (sv)) {
+ arg->v_pointer = NULL;
+ } else {
+ arg->v_pointer = gperl_get_object_check (sv, get_gtype (interface));
+ }
if (arg->v_pointer && transfer >= GI_TRANSFER_CONTAINER) {
g_object_ref (arg->v_pointer);
if (G_IS_INITIALLY_UNOWNED (arg->v_pointer)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]