Small patch to bootstrap an application when embedding Kaffe

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Sun Sep 20 1998 - 16:37:53 EDT


    Hi,

  I would like to commit the following changes. This is just a hook to
allow bootstrapping an application using a native method. This should
be completely harmless and allow me to start Kaffe in amaya using
Kaffe's main() (and hence I don't have to reimplements all the tricks
done there in my own code). The hook is just used to give back the
control to the app native code once the Java V.M. has started (and
a that time I can registed my full set of native functions ...).

  Hope this is not a problem, I will commit it this week if I don't get
a negative feedback.

Next step will be to reorganize the runtime model of Amaya-Java to
get a cleaner event handling model (probably to hook it with the Awt
implementation).

 Daniel

---------------- Diff ------------------
Index: include/native.h
===================================================================
RCS file: /home/cvspublic/kaffe/include/native.h,v
retrieving revision 1.2
diff -r1.2 native.h
85a86,93
> #if defined(NO_SHARED_LIBRARIES)
> /*
> * Handler to bootstrap an application.
> */
> extern void (*nativeAppFunction)(void);
> extern char *nativeAppFunctionName;
> #endif
>
Index: kaffe/kaffevm/external.c
===================================================================
RCS file: /home/cvspublic/kaffe/kaffe/kaffevm/external.c,v
retrieving revision 1.6
diff -r1.6 external.c
78a79,86
> #if defined(NO_SHARED_LIBRARIES)
> /*
> * Handler to bootstrap an application.
> */
> void (*nativeAppFunction)(void) = NULL;
> char *nativeAppFunctionName = NULL;
> #endif
>
154a163,165
> /* Add the application native function */
> if ((nativeAppFunction != NULL) && (nativeAppFunctionName != NULL))
> addNativeMethod(nativeAppFunctionName, nativeAppFunction);
------------ End of Diff ------------------

-- 
Daniel.Veillard@w3.org | W3C  MIT/LCS  NE43-344  | Today's Bookmarks :
Tel : +1 617 253 5884  | 545 Technology Square   | Linux, WWW, rpm2html,
Fax : +1 617 258 5999  | Cambridge, MA 02139 USA | badminton, Kaffe,
http://www.w3.org/People/W3Cpeople.html#Veillard | HTTP-NG and Amaya.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:56:57 EDT