@@ -35,7 +35,7 @@ internal class Cursor<E: __EntityRelatable & EntityInspectable> where E == E.Ent
3535 }
3636
3737 func put( id entityId: Id , data: OBX_bytes , mode: PutMode ) throws {
38- try checkLastError ( obx_cursor_put4 ( cCursor, entityId, data. data, data. size, mode) )
38+ try checkLastError ( obx_cursor_put4 ( cCursor, entityId, data. data, data. size, OBXPutMode ( mode. rawValue ) ) )
3939 }
4040
4141 func remove( _ entity: EntityType ) throws -> Bool {
@@ -71,7 +71,7 @@ internal class Cursor<E: __EntityRelatable & EntityInspectable> where E == E.Ent
7171 /// Returned pointer is only valid for the duration of the current transaction.
7272 func get( _ entityId: Id ) throws -> OBX_bytes {
7373 var bytes = OBX_bytes ( data: nil , size: 0 )
74- var ptr : UnsafeMutableRawPointer ?
74+ var ptr : UnsafeRawPointer ?
7575 try checkLastError ( obx_cursor_first ( cCursor, & ptr, & bytes. size) )
7676 bytes. data = UnsafeRawPointer ( ptr)
7777 return bytes
@@ -81,7 +81,7 @@ internal class Cursor<E: __EntityRelatable & EntityInspectable> where E == E.Ent
8181 /// - Returns: result.data == nil if there are no more items.
8282 func first( ) throws -> OBX_bytes {
8383 var bytes = OBX_bytes ( data: nil , size: 0 )
84- var ptr : UnsafeMutableRawPointer ?
84+ var ptr : UnsafeRawPointer ?
8585 let err = obx_cursor_first ( cCursor, & ptr, & bytes. size)
8686 if err == OBX_NOT_FOUND { obx_last_error_clear ( ) ; return bytes }
8787 try checkLastError ( err)
@@ -93,7 +93,7 @@ internal class Cursor<E: __EntityRelatable & EntityInspectable> where E == E.Ent
9393 /// - Returns: result.data == nil if there are no more items.
9494 func next( ) throws -> OBX_bytes {
9595 var bytes = OBX_bytes ( data: nil , size: 0 )
96- var ptr : UnsafeMutableRawPointer ?
96+ var ptr : UnsafeRawPointer ?
9797 let err = obx_cursor_next ( cCursor, & ptr, & bytes. size)
9898 if err == OBX_NOT_FOUND { obx_last_error_clear ( ) ; return bytes }
9999 try checkLastError ( err)
0 commit comments