summaryrefslogtreecommitdiff
path: root/compiler/defcmp.pas
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2009-07-30 19:28:55 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2009-07-30 19:28:55 +0000
commit158b6296a4c4cfb38ad39638176159036a31ce01 (patch)
treef2973aac981716cc883a1e9ec96121f9c6611bbe /compiler/defcmp.pas
parentfc8b1e3e72597ad80807eea5121c58c1c80bbc0f (diff)
downloadfpc-cpstr.tar.gz
* uncommited stuff for code page aware stringscpstr
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/cpstr@13478 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/defcmp.pas')
-rw-r--r--compiler/defcmp.pas8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/defcmp.pas b/compiler/defcmp.pas
index 068354da60..bfc445c5a9 100644
--- a/compiler/defcmp.pas
+++ b/compiler/defcmp.pas
@@ -340,10 +340,14 @@ implementation
end;
end
else
- { Same string type, for shortstrings also the length must match }
+ { same string type ? }
if (tstringdef(def_from).stringtype=tstringdef(def_to).stringtype) and
+ { for shortstrings also the length must match }
((tstringdef(def_from).stringtype<>st_shortstring) or
- (tstringdef(def_from).len=tstringdef(def_to).len)) then
+ (tstringdef(def_from).len=tstringdef(def_to).len)) and
+ { for ansi- and unicodestrings also the encoding must match }
+ (not(tstringdef(def_from).stringtype in [st_ansistring,st_unicodestring]) or
+ (tstringdef(def_from).stringencoding=tstringdef(def_to).stringencoding))then
eq:=te_equal
else
begin