From b3b404db4b6050b2c8402c788701e466f1168e55 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 6 Sep 2013 08:02:52 +0000 Subject: [PATCH] * handle any char constant -> p(wide)char conversions via cunicodestringtype because the compiler cannot convert arbitrary unicodechar constants at compile time to a shortstring (since it doesn't know the code page to use) (test part of next commit) git-svn-id: branches/cpstrrtl@25429 - --- compiler/ncnv.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index 2a9fbe9081..b0ec85b48d 100644 --- a/compiler/ncnv.pas +++ b/compiler/ncnv.pas @@ -1458,10 +1458,10 @@ implementation begin result:=nil; - if is_pwidechar(resultdef) then - inserttypeconv(left,cunicodestringtype) - else - inserttypeconv(left,cshortstringtype); + { handle any constants via cunicodestringtype because the compiler + cannot convert arbitrary unicodechar constants at compile time to + a shortstring (since it doesn't know the code page to use) } + inserttypeconv(left,cunicodestringtype); { evaluate again, reset resultdef so the convert_typ will be calculated again and cstring_to_pchar will be used for futher conversion }