From c52612e1629fd613888cdc91db8449f27a5310af Mon Sep 17 00:00:00 2001 From: Leorize Date: Thu, 4 Jun 2020 00:12:26 -0500 Subject: [PATCH] wrappers/openssl: getOpenSSLVersion is gcsafe Yet another weird {.gcsafe.} triggering when it shouldn't. --- lib/wrappers/openssl.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index 29cda3efca..2a03b577f7 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