Skip to content

Commit

Permalink
3.0.15: fix nimterop usage
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jul 6, 2020
1 parent 5f9b9ec commit 2bfc46e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion golden.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.0.14"
version = "3.0.15"
author = "disruptek"
description = "a benchmark tool"
license = "MIT"
Expand All @@ -9,6 +9,7 @@ requires "bump >= 1.8.15"
requires "msgpack4nim 0.2.9"
requires "terminaltables#82ee5890c13e381de0f11c8ba6fe484d7c0c2f19"
requires "https://github.com/disruptek/gittyup >= 2.4.4 & < 3.0.0"
requires "nimterop >= 0.6.2 & < 1.0.0"

# we need this one for csize reasons
requires "cligen >= 0.9.40"
Expand Down
8 changes: 4 additions & 4 deletions src/golden/lm.nim
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ proc open(self: var GoldenDatabase; path: string) =
GC_ref(env)
self.db = addr env[]
else:
var e: MDBEnv
self.db = addr e
var e: ptr MDBEnv
self.db = e
if mdb_env_create(addr self.db) != 0:
raise newException(IOError, "unable to instantiate db")
if mdb_env_set_maxdbs(self.db, MAXDBS) != 0:
Expand Down Expand Up @@ -206,8 +206,8 @@ proc newTransaction(self: GoldenDatabase): ptr MDBTxn =
GC_ref(txn)
result = addr txn[]
else:
var txn: MDB_Txn
result = addr txn
var txn: ptr MDB_Txn
result = txn
assert parent == nil
if mdb_txn_begin(self.db, parent, flags = flags, addr result) != 0:
raise newException(IOError, "unable to begin transaction")
Expand Down

0 comments on commit 2bfc46e

Please sign in to comment.