From b4ac714201635c6eec54169e46a941a36a5936a2 Mon Sep 17 00:00:00 2001 From: sergei Date: Sun, 21 Nov 2010 18:10:11 +0000 Subject: [PATCH] * defutil.pas: added UnicodeString to automatable types, fixes compilation of webtbs/tw2649.pp after r16360. However it requires RTL support similar to one for AnsiString to be complete. * ncal.pas, translate_disp_call(): fixed parameter alignment once more, this time it should be correct for both 32 and 64 bit platforms. git-svn-id: trunk@16394 - --- compiler/defutil.pas | 2 +- compiler/ncal.pas | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/defutil.pas b/compiler/defutil.pas index db47490007..9f7dd87ffa 100644 --- a/compiler/defutil.pas +++ b/compiler/defutil.pas @@ -1047,7 +1047,7 @@ implementation floatdef: result:=tfloatdef(p).floattype in [s64currency,s64real,s32real]; stringdef: - result:=tstringdef(p).stringtype in [st_ansistring,st_widestring]; + result:=tstringdef(p).stringtype in [st_ansistring,st_widestring,st_unicodestring]; variantdef: result:=true; objectdef: diff --git a/compiler/ncal.pas b/compiler/ncal.pas index 2ed18366d9..d464bc6fc7 100644 --- a/compiler/ncal.pas +++ b/compiler/ncal.pas @@ -400,7 +400,7 @@ implementation { we've to know the parameter size to allocate the temp. space } is_byref_para(assignmenttype); - inc(paramssize, assignmenttype.size); + inc(paramssize,max(voidpointertype.size,assignmenttype.size)); para:=tcallparanode(para.nextpara); end; @@ -454,7 +454,7 @@ implementation restype:=restype or $80; { assign the argument/parameter to the temporary location } - { we always pass Variants by reference, RTL helpers must handle it + { for Variants, we always pass a pointer, RTL helpers must handle it depending on byref bit } if assignmenttype=voidpointertype then @@ -474,7 +474,7 @@ implementation )),assignmenttype), ctypeconvnode.create_internal(para.left,assignmenttype))); - inc(paramssize,assignmenttype.size); + inc(paramssize,max(voidpointertype.size,assignmenttype.size)); calldescnode.appendbyte(restype); para.left:=nil;