Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable lent with orc until 2.2 #49

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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