c89 fix.
[cacao.git] / loader.c
index bdfe7d691199c80fdd3d742dc47a8b15bebc93da..75b607b0d45c1c217fe2ef770cc454e988dc22af 100644 (file)
--- a/loader.c
+++ b/loader.c
@@ -32,7 +32,7 @@
             Edwin Steiner
             Christian Thalinger
 
-   $Id: loader.c 1415 2004-10-11 20:12:08Z jowenn $
+   $Id: loader.c 1494 2004-11-12 13:34:26Z twisti $
 
 */
 
@@ -1322,7 +1322,6 @@ static bool method_load(classbuffer *cb, classinfo *c, methodinfo *m)
        m->stackcount = 0;
        m->stack = NULL;
        m->exceptiontable = NULL;
-       m->registerdata = NULL;
        m->stubroutine = NULL;
        m->mcode = NULL;
        m->entrypoint = NULL;
@@ -1342,8 +1341,11 @@ static bool method_load(classbuffer *cb, classinfo *c, methodinfo *m)
                        method_display(m);
                }*/
                functionptr f = native_findfunction(c->name, m->name, m->descriptor, 
-                                                                                       (m->flags & ACC_STATIC) != 0);
-               if (f) {
+                                                       (m->flags & ACC_STATIC) != 0);
+#ifdef STATIC_CLASSPATH
+               if (f) 
+#endif
+                {
                        m->stubroutine = createnativestub(f, m);
                }
        }
@@ -1898,12 +1900,13 @@ static bool class_loadcpool(classbuffer *cb, classinfo *c)
                                return false;
 
                        if (opt_verify &&
-                               !is_valid_utf(cb->pos + 1, cb->pos + 1 + length)) {
+                               !is_valid_utf((char *) (cb->pos + 1),
+                                                         (char *) (cb->pos + 1 + length))) {
                                dolog("Invalid UTF-8 string (constant pool index %d)",idx);
                                panic("Invalid UTF-8 string");
                        }
                        /* insert utf-string into the utf-symboltable */
-                       cpinfos[idx] = utf_new_intern(cb->pos + 1, length);
+                       cpinfos[idx] = utf_new_intern((char *) (cb->pos + 1), length);
 
                        /* skip bytes of the string (buffer size check above) */
                        skip_nbytes(cb, length);
@@ -2905,7 +2908,7 @@ static classinfo *class_link_intern(classinfo *c)
                                return NULL;
 
                if (super->flags & ACC_INTERFACE) {
-                       // java.lang.IncompatibleClassChangeError: class a has interface java.lang.Cloneable as super class
+                       /* java.lang.IncompatibleClassChangeError: class a has interface java.lang.Cloneable as super class */
                        panic("Interface specified as super class");
                }
 
@@ -2954,7 +2957,7 @@ static classinfo *class_link_intern(classinfo *c)
                                                        goto notfoundvftblindex;
 
                                                if (tc->methods[j].flags & ACC_FINAL) {
-                                                       // class a overrides final method .
+                                                       /* class a overrides final method . */
                                                        *exceptionptr =
                                                                new_exception(string_java_lang_VerifyError);
                                                        return NULL;