Skip to content

Commit bbd8291

Browse files
committed
move internal sources to Internal dir
1 parent e399821 commit bbd8291

File tree

11 files changed

+7
-8
lines changed

11 files changed

+7
-8
lines changed

Source/ios-framework/CommonSource/Cursor.swift renamed to Source/ios-framework/CommonSource/Internal/Cursor.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

Source/ios-framework/CommonSource/ObjectBox.h renamed to Source/ios-framework/CommonSource/Internal/ObjectBox.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515
//
16-
// TODO can we get rid of this file?
16+
// This is the "umbrella header"; Xcode seems to require it for some module definition (unextended-module.modulemap)
1717

18-
#import <Foundation/Foundation.h> // we still depend on stuff like
1918
#import "obx_fbb.h"
20-
#import "ObjectBoxC.h"
19+
#import "objectbox-c.h"

0 commit comments

Comments
 (0)