oops looks like i commented out the wrong line when changing the widestringmanager system for improved flexibility.
the code should be:
Function fpc_ShortStr_To_WideStr (Const S2 : ShortString): WideString;
{$ifdef hascompilerproc} compilerproc; {$endif}
{
Converts a ShortString to a WideString;
}
Var
Size : SizeInt;
begin
Size:=Length(S2);
//Setlength (fpc_ShortStr_To_WideStr,Size);
if Size>0 then
begin
widestringmanager.Ansi2WideMoveProc(PChar(@S2[1]),fpc_ShortStr_To_WideStr,Si ze);
{ Terminating Zero }
PWideChar(Pointer(fpc_ShortStr_To_WideStr)+Size*sizeof(WideChar))^:=#0;
end;
end;
Show quoted text 26 lines
-----Original Message-----
From:
Behalf Of C Western
Sent: 21 March 2005 21:37
To: FPC developers' list
Subject: [fpc-devel] fpc_ShortStr_To_WideStr
Is the assignment to Size meant to be commented out? (I have just
started having trouble with a program which I think has just started
using widestrings because the DOM unit has been switched to widestrings.)
Colin
Function fpc_ShortStr_To_WideStr (Const S2 : ShortString): WideString;
{$ifdef hascompilerproc} compilerproc; {$endif}
{
Converts a ShortString to a WideString;
}
Var
Size : SizeInt;
begin
//Size:=Length(S2);
_______________________________________________
fpc-devel maillist -
http://lists.freepascal.org/mailman/listinfo/fpc-devel