From b2cdab26af05b3bb1643d6d6a3d4efa3d6e12f6f Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 18 Mar 2006 09:20:18 +0000 Subject: [PATCH] * automatically convert (wide)chararrays to p(wide)chars for C varargs git-svn-id: trunk@2951 - --- compiler/nld.pas | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/nld.pas b/compiler/nld.pas index d3a6c7d45e..19fa6736a6 100644 --- a/compiler/nld.pas +++ b/compiler/nld.pas @@ -938,12 +938,10 @@ implementation hp.left:=ctypeconvnode.create_internal(hp.left,s32inttype); arraydef : begin - if not(iscvarargs) and - is_chararray(hp.left.resulttype.def) then + if is_chararray(hp.left.resulttype.def) then hp.left:=ctypeconvnode.create_internal(hp.left,charpointertype) else - if not(iscvarargs) and - is_widechararray(hp.left.resulttype.def) then + if is_widechararray(hp.left.resulttype.def) then hp.left:=ctypeconvnode.create_internal(hp.left,widecharpointertype) else CGMessagePos1(hp.left.fileinfo,type_e_wrong_type_in_array_constructor,hp.left.resulttype.def.typename);