[fix] Fix C-compilation error failing tests
This commit is contained in:
parent
01419d3fc3
commit
58f3335cc1
|
@ -32,7 +32,9 @@ proc start(purchase: Purchase) {.gcsafe.}
|
||||||
func id*(purchase: Purchase): PurchaseId
|
func id*(purchase: Purchase): PurchaseId
|
||||||
proc `==`*(x, y: PurchaseId): bool {.borrow.}
|
proc `==`*(x, y: PurchaseId): bool {.borrow.}
|
||||||
proc hash*(x: PurchaseId): Hash {.borrow.}
|
proc hash*(x: PurchaseId): Hash {.borrow.}
|
||||||
proc toHex*(x: PurchaseId): string {.borrow.}
|
# Using {.borrow.} for toHex does not borrow correctly and causes a
|
||||||
|
# C-compilation error, so we must do it long form
|
||||||
|
proc toHex*(x: PurchaseId): string = array[32, byte](x).toHex
|
||||||
|
|
||||||
proc new*(_: type Purchasing, market: Market, clock: Clock): Purchasing =
|
proc new*(_: type Purchasing, market: Market, clock: Clock): Purchasing =
|
||||||
Purchasing(
|
Purchasing(
|
||||||
|
|
Loading…
Reference in New Issue