Skip to content

Commit

Permalink
Fix subscription have the wrong type for Int / UInt in WorkspaceDicti…
Browse files Browse the repository at this point in the history
…onary.
  • Loading branch information
liuliu committed Jan 14, 2023
1 parent 1c2bb6d commit 2b98a69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sqlite/SQLiteWorkspaceDictionary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,14 @@ extension SQLiteWorkspaceDictionary {
DictItem.key == key && DictItem.namespace == storage.namespace
).first {
assert(value.valueType == .longValue)
let object = value.longValue
let object = Int(value.longValue)
storage.lock(tuple.1)
// If no one else populated the cache, do that now.
if storage.get(key, hashValue: tuple.1) == nil {
storage.set(key, hashValue: tuple.1, value: object)
}
storage.unlock(tuple.1)
fetchedValue = Int(object)
fetchedValue = object
} else {
storage.lock(tuple.1)
// If no one else populated the cache, do that now.
Expand Down Expand Up @@ -930,14 +930,14 @@ extension SQLiteWorkspaceDictionary {
DictItem.key == key && DictItem.namespace == storage.namespace
).first {
assert(value.valueType == .unsignedLongValue)
let object = value.unsignedLongValue
let object = UInt(value.unsignedLongValue)
storage.lock(tuple.1)
// If no one else populated the cache, do that now.
if storage.get(key, hashValue: tuple.1) == nil {
storage.set(key, hashValue: tuple.1, value: object)
}
storage.unlock(tuple.1)
fetchedValue = UInt(object)
fetchedValue = object
} else {
storage.lock(tuple.1)
// If no one else populated the cache, do that now.
Expand Down

0 comments on commit 2b98a69

Please sign in to comment.