* native_findfunction: return non-NULL, otherwise we get an exception
authortwisti <none@none>
Thu, 30 Jun 2005 09:55:49 +0000 (09:55 +0000)
committertwisti <none@none>
Thu, 30 Jun 2005 09:55:49 +0000 (09:55 +0000)
src/cacaoh/headers.c

index 5ff053b8d0ee0d39e69e4841d9c79c862a4100b4..69fed2ed7cc56cb3bc465dfac1bcbda6c7de6a93 100644 (file)
@@ -30,7 +30,7 @@
             Philipp Tomsich
             Christian Thalinger
 
-   $Id: headers.c 2858 2005-06-28 18:36:08Z twisti $
+   $Id: headers.c 2878 2005-06-30 09:55:49Z twisti $
 
 */
 
@@ -74,10 +74,15 @@ java_objectheader *_exceptionptr = NULL;
 #endif
 
 
-/******* replace some external functions  *********/
-functionptr native_findfunction(utf *cname, utf *mname, utf *desc, bool isstatic)
-{ return NULL; }
+/* replace some non-vmcore functions ******************************************/
+
+functionptr native_findfunction(utf *cname, utf *mname, utf *desc,
+                                                               bool isstatic)
+{
+       /* return something different than NULL, otherwise we get an exception */
+
+       return (functionptr) 1;
+}
 
 java_objectheader *native_new_and_init(classinfo *c) { return NULL; }
 java_objectheader *native_new_and_init_string(classinfo *c, java_lang_String *s) { return NULL; }
@@ -200,6 +205,8 @@ void throw_cacao_exception_exit(const char *exception, const char *message, ...)
        vfprintf(stderr, message, ap);
        va_end(ap);
 
+       fputc('\n', stderr);
+
        exit(1);
 }