42 |
#include <stdio.h> |
#include <stdio.h> |
43 |
#include <jcl.h> |
#include <jcl.h> |
44 |
|
|
45 |
|
#ifndef __GNUC__ |
46 |
|
#define __attribute__(x) /* nothing */ |
47 |
|
#endif |
48 |
|
|
49 |
JNIEXPORT void JNICALL JCL_ThrowException(JNIEnv * env, char * className, char * errMsg) { |
JNIEXPORT void JNICALL JCL_ThrowException(JNIEnv * env, char * className, char * errMsg) { |
50 |
jclass excClass; |
jclass excClass; |
51 |
if((*env)->ExceptionOccurred(env)) { |
if((*env)->ExceptionOccurred(env)) { |
97 |
return(ptr); |
return(ptr); |
98 |
} |
} |
99 |
|
|
100 |
JNIEXPORT void JNICALL JCL_free(JNIEnv * env, void * p) { |
JNIEXPORT void JNICALL JCL_free(JNIEnv * env __attribute__((unused)), |
101 |
|
void * p) |
102 |
|
{ |
103 |
if(p != NULL) { |
if(p != NULL) { |
104 |
free(p); |
free(p); |
105 |
} |
} |