summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorLeorize <leorize+oss@disroot.org>2020-06-04 00:12:26 -0500
committerAndreas Rumpf <rumpf_a@web.de>2020-06-06 21:11:53 +0200
commit61d4fbce4f0ae764092c51591112ce39d78fca73 (patch)
tree77089377f55238bf8cf01bb9f025d1b989afd83f /lib
parent6c0f86c486f6491a2602e95228e63f3c44ab14fc (diff)
downloadNim-61d4fbce4f0ae764092c51591112ce39d78fca73.tar.gz
wrappers/openssl: getOpenSSLVersion is gcsafe
Yet another weird {.gcsafe.} triggering when it shouldn't.
Diffstat (limited to 'lib')
-rw-r--r--lib/wrappers/openssl.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim
index 29cda3efc..2a03b577f 100644
--- a/lib/wrappers/openssl.nim
+++ b/lib/wrappers/openssl.nim
@@ -395,9 +395,10 @@ else:
   proc getOpenSSLVersion*(): culong =
     ## Return OpenSSL version as unsigned long or 0 if not available
     let theProc = cast[proc(): culong {.cdecl.}](sslSymNullable("OpenSSL_version_num"))
-    result =
-      if theProc.isNil: 0.culong
-      else: theProc()
+    {.gcsafe.}:
+      result =
+        if theProc.isNil: 0.culong
+        else: theProc()
 
   proc SSL_in_init*(ssl: SslPtr): cint =
     # A compatibility wrapper for `SSL_in_init()` for OpenSSL 1.0, 1.1 and LibreSSL