Ver código fonte

* make unicodechar equivalent to widechar, resolves #12233

git-svn-id: trunk@11830 -
florian 17 anos atrás
pai
commit
f64dbd70cf
3 arquivos alterados com 15 adições e 1 exclusões
  1. 1 0
      .gitattributes
  2. 1 1
      rtl/inc/systemh.inc
  3. 13 0
      tests/webtbs/tw12233.pp

+ 1 - 0
.gitattributes

@@ -8562,6 +8562,7 @@ tests/webtbs/tw12202.pp svneol=native#text/plain
 tests/webtbs/tw12214.pp svneol=native#text/plain
 tests/webtbs/tw1222.pp svneol=native#text/plain
 tests/webtbs/tw1223.pp svneol=native#text/plain
+tests/webtbs/tw12233.pp svneol=native#text/plain
 tests/webtbs/tw1228.pp svneol=native#text/plain
 tests/webtbs/tw1229.pp svneol=native#text/plain
 tests/webtbs/tw1250.pp svneol=native#text/plain

+ 1 - 1
rtl/inc/systemh.inc

@@ -351,7 +351,7 @@ Type
   PUCS2Char           = PWideChar;
   PWideString         = ^WideString;
 
-  UnicodeChar         = type WideChar;
+  UnicodeChar         = WideChar;
   PUnicodeChar        = ^UnicodeChar;
 {$ifdef VER2_2}
   { this is only to avoid too much ifdefs in the code }

+ 13 - 0
tests/webtbs/tw12233.pp

@@ -0,0 +1,13 @@
+program postest;
+
+{$mode objfpc}{$H+}
+
+var
+  wchar: WideChar;
+  wstring: WideString;
+
+begin
+  wchar := 'a';
+  wstring := 'badc';
+  writeln(Pos(wchar, wstring));
+end.