versionLib function

Version versionLib ()

Returns the underlying ObjectBox-C library version

Implementation

Version versionLib() {
  var majorPtr = allocate<Int32>(),
      minorPtr = allocate<Int32>(),
      patchPtr = allocate<Int32>();

  try {
    bindings.obx_version(majorPtr, minorPtr, patchPtr);
    return Version(majorPtr.value, minorPtr.value, patchPtr.value);
  } finally {
    free(majorPtr);
    free(minorPtr);
    free(patchPtr);
  }
}