mirror of
https://github.com/logos-storage/nim-bearssl.git
synced 2026-01-05 15:03:08 +00:00
brssl: c2nim-generated spelling (#33)
* generate brssl.nim with regenerate.sh as well
This commit is contained in:
parent
32e125015a
commit
1e9b702650
@ -2,7 +2,6 @@ import
|
||||
"."/[csources, bearssl_x509]
|
||||
|
||||
{.pragma: importcFunc, cdecl, gcsafe, noSideEffect, raises: [].}
|
||||
{.pragma: headerFunc, importcFunc, header: "brssl.h".}
|
||||
{.used.}
|
||||
|
||||
const
|
||||
@ -16,9 +15,12 @@ const
|
||||
{.compile: bearToolsPath & "files.c".}
|
||||
|
||||
type
|
||||
X509NoAnchorContext* {.importc: "x509_noanchor_context",
|
||||
header: "brssl.h", bycopy.} = object
|
||||
X509NoanchorContext* {.importc: "x509_noanchor_context", header: "brssl.h", bycopy.} = object
|
||||
vtable* {.importc: "vtable".}: ptr X509Class
|
||||
inner* {.importc: "inner".}: ptr ptr X509Class
|
||||
|
||||
proc initNoAnchor*(xwc: var X509NoAnchorContext, inner: ptr ptr X509Class) {.
|
||||
importcFunc, importc: "x509_noanchor_init", header: "brssl.h".}
|
||||
proc x509NoanchorInit*(xwc: var X509NoanchorContext; inner: ptr ptr X509Class) {.importcFunc,
|
||||
importc: "x509_noanchor_init", header: "brssl.h".}
|
||||
|
||||
proc initNoAnchor*(xwc: var X509NoanchorContext, inner: ptr ptr X509Class) {.
|
||||
importcFunc, importc: "x509_noanchor_init", header: "brssl.h", deprecated: "x509NoanchorInit".}
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
[[ $(c2nim -v) == "0.9.18" ]] || echo "Different c2nim used, check the code"
|
||||
|
||||
mkdir -p gen
|
||||
cp bearssl/csources/inc/*.h gen
|
||||
cp bearssl/csources/tools/brssl.h gen
|
||||
|
||||
# c2nim gets confused by #ifdef inside struct's
|
||||
unifdef -m -UBR_DOXYGEN_IGNORE gen/*.h
|
||||
@ -11,7 +15,6 @@ unifdef -m -UBR_DOXYGEN_IGNORE gen/*.h
|
||||
# https://github.com/nim-lang/c2nim/issues/241
|
||||
# https://github.com/nim-lang/c2nim/issues/242
|
||||
|
||||
[[ $(c2nim -v) == "0.9.18" ]] || echo "Different c2nim used, check the code"
|
||||
c2nim --header --importc --nep1 --prefix:br_ --prefix:BR_ --skipinclude --cdecl --skipcomments gen/*.h
|
||||
|
||||
rm gen/*.h
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user