diff options
author | Kenneth Russel <[email protected]> | 2005-04-04 18:34:03 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-04-04 18:34:03 +0000 |
commit | 57b593f06e39e92b4c41b12e53862ca30e8a41bf (patch) | |
tree | 9b25572d6a38b85a5cd9c10146022bd3cbc47297 /src/net/java/games/gluegen/cgram | |
parent | fae5b8514077f35d5bda856d6f8418d37249554e (diff) |
Fixed Issue 154: Patches for build problems
Submitted patches had a couple of problems. First, the removal of the
(incorrect) cast to const char* in the CMethodBindingEmitter caused
build warnings on other platforms. Fixed these by making the const
declarations correct for the conversion case of String[] -> char**.
Second, addition of comparison of hashCodes in CompoundType.equals()
seemed like too much of a hack. Fixed this by correcting potential
problems in equals() and hashCode() methods; not sure whether this
will solve the submitter's original problem, though.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@254 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/gluegen/cgram')
-rw-r--r-- | src/net/java/games/gluegen/cgram/types/CompoundType.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/java/games/gluegen/cgram/types/CompoundType.java b/src/net/java/games/gluegen/cgram/types/CompoundType.java index d86fa9148..e57400e33 100644 --- a/src/net/java/games/gluegen/cgram/types/CompoundType.java +++ b/src/net/java/games/gluegen/cgram/types/CompoundType.java @@ -76,7 +76,7 @@ public class CompoundType extends Type { } else if (getName() != null) { hashcode = getName().hashCode(); } else { - hashcode = System.identityHashCode(this); + hashcode = 0; } computedHashcode = true; @@ -90,8 +90,9 @@ public class CompoundType extends Type { } CompoundType t = (CompoundType) arg; return (super.equals(arg) && - kind == t.kind && - listsEqual(fields, t.fields)); + (structName == t.structName || (structName != null && structName.equals(t.structName))) && + kind == t.kind && + listsEqual(fields, t.fields)); } /** Returns the struct name of this CompoundType, i.e. the "foo" in |