bugfix: dynlib for variables

This commit is contained in:
Araq
2012-08-05 16:17:00 +02:00
parent 19bc408ec6
commit c0b4448904

View File

@@ -224,8 +224,9 @@ proc processDynLib(c: PContext, n: PNode, sym: PSym) =
incl(sym.loc.flags, lfExportLib)
# since we'll be loading the dynlib symbols dynamically, we must use
# a calling convention that doesn't introduce custom name mangling
# cdecl is the default - the use can override this explicitly
if sym.typ.callConv == ccDefault:
# cdecl is the default - the user can override this explicitly
if sym.kind in RoutineKinds and sym.typ != nil and
sym.typ.callConv == ccDefault:
sym.typ.callConv = ccCDecl
proc processNote(c: PContext, n: PNode) =