TCN_IMPLEMENT_CALL(jlong, Stdlib, calloc)(TCN_STDARGS, jint num, jint size) { UNREFERENCED_STDARGS; if (num && size) return P2J(calloc((size_t)num, (size_t)size)); else return 0; }
TCN_IMPLEMENT_CALL(jlong, Stdlib, malloc)(TCN_STDARGS, jint size) { UNREFERENCED_STDARGS; if (size) return P2J(malloc((size_t)size)); else return 0; }
TCN_IMPLEMENT_CALL(jlong, Stdlib, realloc)(TCN_STDARGS, jlong mem, jint size) { void *ptr = J2P(mem, void *); UNREFERENCED_STDARGS; if (size) return P2J(realloc(ptr, (size_t)size)); else return 0; }
/* * Get a jk_env_t * from the pool * * XXX We should use per thread data or per jniEnv data ( the jniEnv and jk_env are * serving the same purpose ) */ JNIEXPORT jlong JNICALL Java_org_apache_jk_apr_AprImpl_getJkEnv (JNIEnv *jniEnv, jobject o ) { jk_env_t *env; if( jk_env_globalEnv == NULL ) return 0; env=jk_env_globalEnv->getEnv( jk_env_globalEnv ); return P2J(env); }
TCN_IMPLEMENT_CALL(jlong, Library, globalPool)(TCN_STDARGS) { UNREFERENCED_STDARGS; return P2J(tcn_global_pool); }
TCN_IMPLEMENT_CALL(jlong, Buffer, address)(TCN_STDARGS, jobject bb) { UNREFERENCED(o); return P2J((*e)->GetDirectBufferAddress(e, bb)); }