Browse Source

* fix internal alias parameters for incr_ref

git-svn-id: trunk@3844 -
peter 19 years ago
parent
commit
eb8db1e460
3 changed files with 21 additions and 1 deletions
  1. 1 0
      .gitattributes
  2. 1 1
      rtl/inc/wstrings.inc
  3. 19 0
      tests/webtbs/tw7006.pp

+ 1 - 0
.gitattributes

@@ -7189,6 +7189,7 @@ tests/webtbs/tw6767.pp svneol=native#text/plain
 tests/webtbs/tw6960.pp svneol=native#text/plain
 tests/webtbs/tw6980.pp svneol=native#text/plain
 tests/webtbs/tw6989.pp svneol=native#text/plain
+tests/webtbs/tw7006.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 1 - 1
rtl/inc/wstrings.inc

@@ -239,7 +239,7 @@ Procedure fpc_WideStr_Incr_Ref(Var S : Pointer);[Public,Alias:'FPC_WIDESTR_INCR_
   end;
 
 { alias for internal use }
-Procedure fpc_WideStr_Incr_Ref (S : Pointer);[external name 'FPC_WIDESTR_INCR_REF'];
+Procedure fpc_WideStr_Incr_Ref (var S : Pointer);[external name 'FPC_WIDESTR_INCR_REF'];
 
 function fpc_WideStr_To_ShortStr (high_of_res: SizeInt;const S2 : WideString): shortstring;[Public, alias: 'FPC_WIDESTR_TO_SHORTSTR'];  compilerproc;
 {

+ 19 - 0
tests/webtbs/tw7006.pp

@@ -0,0 +1,19 @@
+program av;
+{$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif}
+{$ifdef mswindows}{$apptype console}{$endif}
+uses
+ {$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}sysutils;
+type
+ testrecty = record
+  str: widestring;
+  int: integer;
+ end;
+
+var
+ tr1,tr2: testrecty;
+ 
+begin
+ tr1.str:= 'abc';
+ tr1.int:= 0;
+ tr2:= tr1;
+end.