bugfix: dynlib for variables

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

View file

@ -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) =