bugfix: dynlib for variables
This commit is contained in:
parent
19bc408ec6
commit
c0b4448904
1 changed files with 3 additions and 2 deletions
|
|
@ -224,8 +224,9 @@ proc processDynLib(c: PContext, n: PNode, sym: PSym) =
|
||||||
incl(sym.loc.flags, lfExportLib)
|
incl(sym.loc.flags, lfExportLib)
|
||||||
# since we'll be loading the dynlib symbols dynamically, we must use
|
# since we'll be loading the dynlib symbols dynamically, we must use
|
||||||
# a calling convention that doesn't introduce custom name mangling
|
# a calling convention that doesn't introduce custom name mangling
|
||||||
# cdecl is the default - the use can override this explicitly
|
# cdecl is the default - the user can override this explicitly
|
||||||
if sym.typ.callConv == ccDefault:
|
if sym.kind in RoutineKinds and sym.typ != nil and
|
||||||
|
sym.typ.callConv == ccDefault:
|
||||||
sym.typ.callConv = ccCDecl
|
sym.typ.callConv = ccCDecl
|
||||||
|
|
||||||
proc processNote(c: PContext, n: PNode) =
|
proc processNote(c: PContext, n: PNode) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue