Bug 154

Summary: Patches for build problems
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P1    
Version: 1   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---
Attachments: diffs applied to tree

Description Sven Gothel 2010-03-24 07:47:44 CET


---- Reported by gtgtgtgtgtgtgt 2005-04-02 09:44:45 ----

These two minor fixes address the problems discussed here:
http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1108328385

The first part handles an invalid lvalue complaint from the stricter GCC 4
preview, and the second part fixes a bug in gluegen preventing jogl from
building reliably.


Index: src/net/java/games/gluegen/CMethodBindingEmitter.java
===================================================================
RCS file: /cvs/jogl/src/net/java/games/gluegen/CMethodBindingEmitter.java,v
retrieving revision 1.7
diff -u -r1.7 CMethodBindingEmitter.java
--- src/net/java/games/gluegen/CMethodBindingEmitter.java       4 Oct 2004
22:55:38 -0000       1.7
+++ src/net/java/games/gluegen/CMethodBindingEmitter.java       2 Apr 2005
09:02:11 -0000
@@ -609,7 +609,7 @@
             writer.print("  ");
             emitGetStringUTFChars(writer,
                                   "(jstring) _tmpObj",
-                                  "(const char*)"+convName+"_copy[_copyIndex]");
+                                  convName+"_copy[_copyIndex]");
           }
           else if (isNIOBufferClass(subArrayElementJavaType))
           {
Index: src/net/java/games/gluegen/cgram/types/CompoundType.java
===================================================================
RCS file: /cvs/jogl/src/net/java/games/gluegen/cgram/types/CompoundType.java,v
retrieving revision 1.2
diff -u -r1.2 CompoundType.java
--- src/net/java/games/gluegen/cgram/types/CompoundType.java    14 Jul 2003
05:34:51 -0000      1.2
+++ src/net/java/games/gluegen/cgram/types/CompoundType.java    2 Apr 2005
09:02:11 -0000
@@ -88,6 +88,8 @@
     if (arg == null || (!(arg instanceof CompoundType))) {
       return false;
     }
+    if (arg.hashCode() != hashCode())
+      return false;
     CompoundType t = (CompoundType) arg;
     return (super.equals(arg) &&
                        kind == t.kind &&



---- Additional Comments From kbr 2005-04-04 11:35:16 ----

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.

The applied diffs have been added as an attachment.




---- Additional Comments From kbr 2005-04-04 11:36:18 ----

Created an attachment
diffs applied to tree




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:47 EDT  ---

This bug was previously known as _bug_ 154 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=154
Imported an attachment (id=47)

The original submitter of attachment 47 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.