Merge pull request #444 from adamretter/java-api-fix

Fix the Java API build on Mac OS X
main
Igor Canadi 10 years ago
commit ded26605f4
  1. 2
      java/rocksjni/slice.cc

@ -28,7 +28,7 @@ void Java_org_rocksdb_AbstractSlice_createNewSliceFromString(
JNIEnv* env, jobject jobj, jstring jstr) { JNIEnv* env, jobject jobj, jstring jstr) {
const auto* str = env->GetStringUTFChars(jstr, 0); const auto* str = env->GetStringUTFChars(jstr, 0);
const int len = strlen(str); const size_t len = strlen(str);
char* buf = new char[len]; char* buf = new char[len];
memcpy(buf, str, len); memcpy(buf, str, len);
env->ReleaseStringUTFChars(jstr, str); env->ReleaseStringUTFChars(jstr, str);

Loading…
Cancel
Save