[perl-Glib-Object-Introspection] Adjust the position of a conditional to make more sense



commit f9c212dbe7726ae32e2a4578e0f3cb9f551ed99b
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date:   Sat May 12 21:49:45 2012 +0200

    Adjust the position of a conditional to make more sense

 GObjectIntrospection.xs |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/GObjectIntrospection.xs b/GObjectIntrospection.xs
index 95b6cdb..0c18758 100644
--- a/GObjectIntrospection.xs
+++ b/GObjectIntrospection.xs
@@ -337,18 +337,6 @@ _register_types (class, namespace, package)
 			av_push (interfaces, newSVpv (name, PL_na));
 		}
 
-		if (info_type != GI_INFO_TYPE_OBJECT &&
-		    info_type != GI_INFO_TYPE_INTERFACE &&
-		    info_type != GI_INFO_TYPE_BOXED &&
-		    info_type != GI_INFO_TYPE_STRUCT &&
-		    info_type != GI_INFO_TYPE_UNION &&
-		    info_type != GI_INFO_TYPE_ENUM &&
-		    info_type != GI_INFO_TYPE_FLAGS)
-		{
-			g_base_info_unref ((GIBaseInfo *) info);
-			continue;
-		}
-
 		if (info_type == GI_INFO_TYPE_OBJECT ||
 		    info_type == GI_INFO_TYPE_INTERFACE ||
 		    info_type == GI_INFO_TYPE_BOXED ||
@@ -369,6 +357,19 @@ _register_types (class, namespace, package)
 			store_vfuncs (objects_with_vfuncs, info);
 		}
 
+		/* These are the types that we want to register with perl-Glib. */
+		if (info_type != GI_INFO_TYPE_OBJECT &&
+		    info_type != GI_INFO_TYPE_INTERFACE &&
+		    info_type != GI_INFO_TYPE_BOXED &&
+		    info_type != GI_INFO_TYPE_STRUCT &&
+		    info_type != GI_INFO_TYPE_UNION &&
+		    info_type != GI_INFO_TYPE_ENUM &&
+		    info_type != GI_INFO_TYPE_FLAGS)
+		{
+			g_base_info_unref ((GIBaseInfo *) info);
+			continue;
+		}
+
 		type = get_gtype ((GIRegisteredTypeInfo *) info);
 		if (!type) {
 			ccroak ("Could not find GType for type %s::%s",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]