nim-bearssl/bearssl/abi/brssl.nim
Eugene Kabanov 554b464b34
Fix gcc-14 issues part 2. (#61)
* Fix recently discovered nim-2.0 gcc-14 issues.

* One more place to fix.
2024-06-27 01:42:04 +03:00

29 lines
1.0 KiB
Nim

import
"."/[csources, bearssl_block, bearssl_pem, bearssl_x509]
{.pragma: importcFunc, cdecl, gcsafe, noSideEffect, raises: [].}
{.used.}
const
bearToolsPath = bearPath & "tools/"
{.compile: bearToolsPath & "vector.c".}
{.compile: bearToolsPath & "xmem.c".}
{.compile: bearToolsPath & "names.c".}
{.compile: bearToolsPath & "certs.c".}
{.compile: bearToolsPath & "files.c".}
type
X509NoanchorContext* {.importc: "x509_noanchor_context", header: "brssl_cpp.h", bycopy.} = object
vtable* {.importc: "vtable".}: ptr X509Class
inner* {.importc: "inner".}: ptr ptr X509Class
proc x509NoanchorInit*(xwc: var X509NoanchorContext; inner: X509ClassPointerConst) {.importcFunc,
importc: "x509_noanchor_init", header: "brssl_cpp.h".}
proc x509NoanchorInit*(xwc: var X509NoanchorContext; inner: ptr ptr X509Class) =
x509NoanchorInit(xwc, X509ClassPointerConst(inner))
proc initNoAnchor*(xwc: var X509NoanchorContext, inner: ptr ptr X509Class) {.
importcFunc, importc: "x509_noanchor_init", header: "brssl_cpp.h", deprecated: "x509NoanchorInit".}