Skip to content

Commit

Permalink
disable lent with orc until 2.2 (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck authored Aug 22, 2024
1 parent 57b2392 commit 71d404b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion results.nim
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,17 @@ const

resultsGenericsOpenSymWorkaroundHint* {.booldefine.} = true

resultsLent {.booldefine.} = (NimMajor, NimMinor, NimPatch) >= (2, 0, 8)
resultsLent {.booldefine.} =
(NimMajor, NimMinor, NimPatch) >= (2, 2, 0) or
(defined(gcRefc) and ((NimMajor, NimMinor, NimPatch) >= (2, 0, 8)))
## Enable return of `lent` types - this *mostly* works in Nim 1.6.18+ but
## there have been edge cases reported as late as 1.6.14 - YMMV -
## conservatively, `lent` is therefore enabled only with the latest Nim
## version at the time of writing, where it could be verified to work with
## several large applications.
##
## ORC is not expected to work until 2.2.
## https://github.com/nim-lang/Nim/issues/23973

when resultsLent:
template maybeLent(T: untyped): untyped =
Expand Down

0 comments on commit 71d404b

Please sign in to comment.