From 9b1938386223dd9d5a635cdb6c199b3ee615d662 Mon Sep 17 00:00:00 2001 From: twisti Date: Thu, 30 Jun 2005 09:55:49 +0000 Subject: [PATCH] * native_findfunction: return non-NULL, otherwise we get an exception --- src/cacaoh/headers.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/cacaoh/headers.c b/src/cacaoh/headers.c index 5ff053b8d..69fed2ed7 100644 --- a/src/cacaoh/headers.c +++ b/src/cacaoh/headers.c @@ -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); } -- 2.25.1