java-gobject-introspection r119 - in trunk/src/org/gnome/gir: compiler repository
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: java-gobject-introspection r119 - in trunk/src/org/gnome/gir: compiler repository
- Date: Sat, 15 Nov 2008 22:21:34 +0000 (UTC)
Author: walters
Date: Sat Nov 15 22:21:34 2008
New Revision: 119
URL: http://svn.gnome.org/viewvc/java-gobject-introspection?rev=119&view=rev
Log:
Don't assume prereqs are actually interfaces
Modified:
trunk/src/org/gnome/gir/compiler/TypeMap.java
trunk/src/org/gnome/gir/repository/GIntrospectionAPI.java
trunk/src/org/gnome/gir/repository/InterfaceInfo.java
Modified: trunk/src/org/gnome/gir/compiler/TypeMap.java
==============================================================================
--- trunk/src/org/gnome/gir/compiler/TypeMap.java (original)
+++ trunk/src/org/gnome/gir/compiler/TypeMap.java Sat Nov 15 22:21:34 2008
@@ -267,8 +267,11 @@
static boolean isAssignableFrom(InterfaceInfo lhs, InterfaceInfo rhs) {
if (lhs.equals(rhs))
return true;
- List<InterfaceInfo> prereqs = Arrays.asList(lhs.getPrerequisites());
- for (InterfaceInfo iface : prereqs) {
+ List<BaseInfo> prereqs = Arrays.asList(lhs.getPrerequisites());
+ for (BaseInfo prereq : prereqs) {
+ if (!(prereq instanceof InterfaceInfo))
+ continue;
+ InterfaceInfo iface = (InterfaceInfo) prereq;
if (isAssignableFrom(iface, rhs))
return true;
}
Modified: trunk/src/org/gnome/gir/repository/GIntrospectionAPI.java
==============================================================================
--- trunk/src/org/gnome/gir/repository/GIntrospectionAPI.java (original)
+++ trunk/src/org/gnome/gir/repository/GIntrospectionAPI.java Sat Nov 15 22:21:34 2008
@@ -174,7 +174,7 @@
int n);
int g_interface_info_get_n_prerequisites (InterfaceInfo info);
- InterfaceInfo g_interface_info_get_prerequisite (InterfaceInfo info,
+ BaseInfo g_interface_info_get_prerequisite (InterfaceInfo info,
int n);
int g_interface_info_get_n_properties (InterfaceInfo info);
PropertyInfo g_interface_info_get_property (InterfaceInfo info,
Modified: trunk/src/org/gnome/gir/repository/InterfaceInfo.java
==============================================================================
--- trunk/src/org/gnome/gir/repository/InterfaceInfo.java (original)
+++ trunk/src/org/gnome/gir/repository/InterfaceInfo.java Sat Nov 15 22:21:34 2008
@@ -6,9 +6,9 @@
super(init);
}
- public InterfaceInfo[] getPrerequisites() {
+ public BaseInfo[] getPrerequisites() {
int n = GIntrospectionAPI.gi.g_interface_info_get_n_prerequisites(this);
- InterfaceInfo[] ret= new InterfaceInfo[n];
+ BaseInfo[] ret= new BaseInfo[n];
for (int i = 0; i < n; i++)
ret[i] = GIntrospectionAPI.gi.g_interface_info_get_prerequisite(this, i);
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]