From 5145fc762a2a9ab38f56643324708846425e94da Mon Sep 17 00:00:00 2001 From: skalogryz Date: Tue, 24 Aug 2010 22:15:44 +0000 Subject: [PATCH] chelper: fix libname writting for non external functions git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1301 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/chelper/ctopasconvert.pas | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/chelper/ctopasconvert.pas b/components/chelper/ctopasconvert.pas index d002330cb..abbf9a019 100644 --- a/components/chelper/ctopasconvert.pas +++ b/components/chelper/ctopasconvert.pas @@ -1118,9 +1118,11 @@ begin wr.W(GetPasTypeName(cent.RetType, n.owner)); end; wr.W(';'); - if isDeclExternal(cfg, cent.RetType, isfunc) then wr.W(' external'); - if cfg.ExtLibName<>'' then wr.W(' '+cfg.ExtLibName); - wr.W(';'); + if isDeclExternal(cfg, cent.RetType, isfunc) then begin + wr.W(' external'); + if isfunc and (cfg.ExtLibName<>'') then wr.W(' '+cfg.ExtLibName); + wr.W(';'); + end; if WriteComment then WriteLnCommentForOffset(cent.Offset); end; end;