Merge pull request #426 from fyrz/RocksJava-Restore-PrecisionFix

[RocksJava] Fixed MacOS build of RocksJava
main
Igor Canadi 10 years ago
commit 703ef66a86
  1. 7
      java/rocksjni/backupablejni.cc
  2. 7
      java/rocksjni/restorejni.cc

@ -112,8 +112,11 @@ jintArray Java_org_rocksdb_BackupableDB_getCorruptedBackups(
}
// Store ints in java array
jintArray ret_backup_ids;
ret_backup_ids = env->NewIntArray(kIdSize);
env->SetIntArrayRegion(ret_backup_ids, 0, kIdSize, int_backup_ids);
// Its ok to loose precision here (64->32)
jsize ret_backup_ids_size = static_cast<jsize>(kIdSize);
ret_backup_ids = env->NewIntArray(ret_backup_ids_size);
env->SetIntArrayRegion(ret_backup_ids, 0, ret_backup_ids_size,
int_backup_ids);
return ret_backup_ids;
}

@ -166,8 +166,11 @@ jintArray Java_org_rocksdb_RestoreBackupableDB_getCorruptedBackups(
}
// Store ints in java array
jintArray ret_backup_ids;
ret_backup_ids = env->NewIntArray(kIdSize);
env->SetIntArrayRegion(ret_backup_ids, 0, kIdSize, int_backup_ids);
// Its ok to loose precision here (64->32)
jsize ret_backup_ids_size = static_cast<jsize>(kIdSize);
ret_backup_ids = env->NewIntArray(ret_backup_ids_size);
env->SetIntArrayRegion(ret_backup_ids, 0, ret_backup_ids_size,
int_backup_ids);
return ret_backup_ids;
}

Loading…
Cancel
Save