static mrb_value hdb_set_cache(mrb_state *mrb, mrb_value self) { hdb_context *context = DATA_PTR(self); mrb_int rcnum; mrb_get_args(mrb, "i", &rcnum); return mrb_bool_value(tchdbsetcache(context->hdb, rcnum)); }
/* setcache */ JNIEXPORT jboolean JNICALL Java_tokyocabinet_HDB_setcache (JNIEnv *env, jobject self, jint rcnum){ TCHDB *hdb = (TCHDB *)(intptr_t)(*env)->GetLongField(env, self, hdb_fid_ptr); return tchdbsetcache(hdb, rcnum); }