Skip to content

Commit fbdef43

Browse files
committed
C API enum values passed as uint32_t
1 parent d6d0219 commit fbdef43

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

objectbox/model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (model *Model) EntityFlags(entityFlags int) {
165165
return
166166
}
167167
model.Error = cCall(func() C.obx_err {
168-
return C.obx_model_entity_flags(model.cModel, C.OBXEntityFlags(entityFlags))
168+
return C.obx_model_entity_flags(model.cModel, C.uint32_t(entityFlags))
169169
})
170170
}
171171

@@ -216,7 +216,7 @@ func (model *Model) PropertyFlags(propertyFlags int) {
216216
return
217217
}
218218
model.Error = cCall(func() C.obx_err {
219-
return C.obx_model_property_flags(model.cModel, C.OBXPropertyFlags(propertyFlags))
219+
return C.obx_model_property_flags(model.cModel, C.uint32_t(propertyFlags))
220220
})
221221
}
222222

objectbox/objectbox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (ob *ObjectBox) getEntityByName(name string) *entity {
187187
// See DebugFlags* constants
188188
func (ob *ObjectBox) SetDebugFlags(flags uint) error {
189189
return cCall(func() C.obx_err {
190-
return C.obx_store_debug_flags(ob.store, C.OBXDebugFlags(flags))
190+
return C.obx_store_debug_flags(ob.store, C.uint32_t(flags))
191191
})
192192
}
193193

objectbox/querybuilder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func (qb *QueryBuilder) LinkManyToMany(relation *RelationToMany, conditions []Co
225225
func (qb *QueryBuilder) order(propertyId C.obx_schema_id, flags C.OBXOrderFlags) {
226226
if qb.Err == nil {
227227
qb.Err = cCall(func() C.obx_err {
228-
return C.obx_qb_order(qb.cqb, propertyId, flags)
228+
return C.obx_qb_order(qb.cqb, propertyId, C.uint32_t(flags))
229229
})
230230
}
231231
}

0 commit comments

Comments
 (0)