Cross-platform JNI sometimes has jlong != int64.

This commit is contained in:
Peter Johnson
2017-08-22 20:49:59 -07:00
parent 909e6c4857
commit be58a279a5
2 changed files with 12 additions and 2 deletions

View File

@@ -356,7 +356,13 @@ Java_edu_wpi_first_wpilibj_hal_SPIJNI_spiGetAccumulatorOutput(
jlong *valuePtr = (jlong *)env->GetDirectBufferAddress(value);
jlong *countPtr = (jlong *)env->GetDirectBufferAddress(count);
HAL_GetSPIAccumulatorOutput(static_cast<HAL_SPIPort>(port), valuePtr, countPtr, &status);
int64_t valueInt64;
int64_t countInt64;
HAL_GetSPIAccumulatorOutput(static_cast<HAL_SPIPort>(port), &valueInt64, &countInt64, &status);
*valuePtr = valueInt64;
*countPtr = countInt64;
SPIJNI_LOG(logDEBUG) << "Status = " << status;
SPIJNI_LOG(logDEBUG) << "Value = " << *valuePtr;