func cGetUint8s(fn func() *C.OBX_int8_array) (items []uint8, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cUint8sArrayToGo(cArray)
		C.obx_int8_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
cGetUint8s converts the given C array to Go and frees the source
package objectbox
import "C"
import (
	"errors"
	"runtime"
)
func cCall(fn func() C.obx_err) (err error) {
	runtime.LockOSThread()
	if rc := fn(); rc != 0 {
		err = createError()
	}
	runtime.UnlockOSThread()
	return err
}
func cCallBool(fn func() bool) (err error) {
	runtime.LockOSThread()
	if successful := fn(); !successful {
		err = createError()
	}
	runtime.UnlockOSThread()
	return err
}
func cGetIds(fn func() *C.OBX_id_array) (ids []uint64, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		ids = cIdsArrayToGo(cArray)
		C.obx_id_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return ids, err
}
func cGetBytesArray(fn func() *C.OBX_bytes_array) (array [][]byte, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		array = cBytesArrayToGo(cArray)
		C.obx_bytes_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return array, err
}
func cGetStrings(fn func() *C.OBX_string_array) (items []string, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cStringsArrayToGo(cArray)
		C.obx_string_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetInts(fn func() *C.OBX_int64_array) (items []int, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cIntsArrayToGo(cArray)
		C.obx_int64_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetUints(fn func() *C.OBX_int64_array) (items []uint, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cUintsArrayToGo(cArray)
		C.obx_int64_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetInt64s(fn func() *C.OBX_int64_array) (items []int64, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cInt64sArrayToGo(cArray)
		C.obx_int64_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetUint64s(fn func() *C.OBX_int64_array) (items []uint64, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cUint64sArrayToGo(cArray)
		C.obx_int64_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetInt32s(fn func() *C.OBX_int32_array) (items []int32, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cInt32sArrayToGo(cArray)
		C.obx_int32_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetUint32s(fn func() *C.OBX_int32_array) (items []uint32, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cUint32sArrayToGo(cArray)
		C.obx_int32_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetInt16s(fn func() *C.OBX_int16_array) (items []int16, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cInt16sArrayToGo(cArray)
		C.obx_int16_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetUint16s(fn func() *C.OBX_int16_array) (items []uint16, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cUint16sArrayToGo(cArray)
		C.obx_int16_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}
func cGetInt8s(fn func() *C.OBX_int8_array) (items []int8, err error) {
	runtime.LockOSThread()
	var cArray = fn()
	if cArray == nil {
		err = createError()
	} else {
		items = cInt8sArrayToGo(cArray)
		C.obx_int8_array_free(cArray)
	}
	runtime.UnlockOSThread()
	return items, err
}