first steps for FFI support at compile time
This commit is contained in:
parent
3be576222a
commit
7148812524
7 changed files with 420 additions and 49 deletions
|
|
@ -469,17 +469,6 @@ include "ccgexprs.nim", "ccgstmts.nim"
|
|||
# ----------------------------- dynamic library handling -----------------
|
||||
# We don't finalize dynamic libs as this does the OS for us.
|
||||
|
||||
proc libCandidates(s: string, dest: var TStringSeq) =
|
||||
var le = strutils.find(s, '(')
|
||||
var ri = strutils.find(s, ')', le+1)
|
||||
if le >= 0 and ri > le:
|
||||
var prefix = substr(s, 0, le - 1)
|
||||
var suffix = substr(s, ri + 1)
|
||||
for middle in split(substr(s, le + 1, ri - 1), '|'):
|
||||
libCandidates(prefix & middle & suffix, dest)
|
||||
else:
|
||||
add(dest, s)
|
||||
|
||||
proc isGetProcAddr(lib: PLib): bool =
|
||||
let n = lib.path
|
||||
result = n.kind in nkCallKinds and n.typ != nil and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue