+ ansistr_to_shortstr and vice versa stub helpers

git-svn-id: branches/jvmbackend@18564 -
This commit is contained in:
Jonas Maebe 2011-08-20 08:10:54 +00:00
parent 6374b473ff
commit baad29373e
2 changed files with 17 additions and 7 deletions

View File

@ -218,14 +218,17 @@ begin
end;
{$else FPC_STRTOSHORTSTRINGPROC}
*)
procedure fpc_AnsiStr_To_ShortStr (out res: shortstring; const S2 : Ansistring);[Public, alias: 'FPC_ANSISTR_TO_SHORTSTR']; compilerproc;
{
Converts a AnsiString to a ShortString;
}
(*
Var
Size : SizeInt;
*)
begin
(*
if S2='' then
res:=''
else
@ -236,24 +239,29 @@ begin
Move (S2[1],res[1],Size);
byte(res[0]):=byte(Size);
end;
*)
end;
(*
{$endif FPC_STRTOSHORTSTRINGPROC}
*)
Function fpc_ShortStr_To_AnsiStr (Const S2 : ShortString): ansistring; compilerproc;
{
Converts a ShortString to a AnsiString;
}
(*
Var
Size : SizeInt;
*)
begin
(*
Size:=Length(S2);
Setlength (fpc_ShortStr_To_AnsiStr,Size);
if Size>0 then
Move(S2[1],Pointer(fpc_ShortStr_To_AnsiStr)^,Size);
end;
*)
end;
Function fpc_Char_To_AnsiStr(const c : AnsiChar): AnsiString; compilerproc;
{

View File

@ -259,10 +259,12 @@ Procedure fpc_AnsiStr_ShortStr_Concat (Var S1: AnsiString; Var S2 : ShortString)
{$ifndef FPC_STRTOSHORTSTRINGPROC}
function fpc_AnsiStr_To_ShortStr (high_of_res: SizeInt;const S2 : Ansistring): shortstring; compilerproc;
{$else FPC_STRTOSHORTSTRINGPROC}
procedure fpc_AnsiStr_To_ShortStr (out res : shortstring;const S2 : Ansistring); compilerproc;
{$endif FPC_STRTOSHORTSTRINGPROC}
Function fpc_ShortStr_To_AnsiStr (Const S2 : ShortString): ansistring; compilerproc;
*)
procedure fpc_AnsiStr_To_ShortStr (out res : shortstring;const S2 : Ansistring); compilerproc;
(*
{$endif FPC_STRTOSHORTSTRINGPROC}
*)
Function fpc_ShortStr_To_AnsiStr (Const S2 : ShortString): ansistring; compilerproc;
{$ifndef nounsupported}
Function fpc_Char_To_AnsiStr(const c : AnsiChar): AnsiString; compilerproc;
{$endif}