The .hh files created with the header file generator are all
included here as are the C functions implementing these methods.
- $Id: native.c 1331 2004-07-21 15:46:54Z twisti $
+ $Id: native.c 1429 2004-11-02 08:58:26Z jowenn $
*/
#include "nativetable.inc"
-/* searchpath for classfiles */
-char *classpath;
-
/* for java-string to char conversion */
#define MAXSTRINGSIZE 1000
#undef JOWENN_DEBUG
#undef JOWENN_DEBUG1
+#ifdef STATIC_CLASSPATH
#define NATIVETABLESIZE (sizeof(nativetable)/sizeof(struct nativeref))
/* table for fast string comparison */
/* string comparsion table initialized */
static bool nativecompdone = false;
-
+#endif
/******************************************************************************/
}
-/********************* function: native_setclasspath **************************/
-
-void native_setclasspath(char *path)
-{
- /* set searchpath for classfiles */
- classpath = path;
-}
-
-
/*********************** Function: native_findfunction *************************
Looks up a method (must have the same class name, method name, descriptor
functionptr native_findfunction(utf *cname, utf *mname,
utf *desc, bool isstatic)
{
+#ifdef STATIC_CLASSPATH
int i;
/* entry of table for fast string comparison */
struct nativecompref *n;
/* keep compiler happy */
return NULL;
+#else
+/* dynamic classpath */
+ return 0;
+#endif
}
/* create new javastring */
js = LNEW(java_lang_String);
+#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+ initObjectLock(&js->header);
+#endif
js->header.vftbl = class_java_lang_String->vftbl;
js->value = stringdata;
js->offset = 0;