From 7e18ac90e5578beea7677cb6c061f61540882eca Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 16 Apr 2013 08:25:54 +0000 Subject: [PATCH] * the 'len' argument of fpc_shortstr_assign changed to smallint on 16-bit cpus, because getintparaloc allocates 16-bit ints on i8086 git-svn-id: branches/i8086@24258 - --- rtl/inc/compproc.inc | 2 +- rtl/inc/generic.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtl/inc/compproc.inc b/rtl/inc/compproc.inc index 862a049e31..c3aaf268df 100644 --- a/rtl/inc/compproc.inc +++ b/rtl/inc/compproc.inc @@ -40,7 +40,7 @@ procedure fpc_zeromem(p:pointer;len:ptruint);compilerproc; procedure fpc_fillmem(out data;len:ptruint;b : byte);compilerproc; procedure fpc_Shortstr_SetLength(var s:shortstring;len:SizeInt); compilerproc; -procedure fpc_shortstr_assign(len:longint;sstr,dstr:pointer); compilerproc; +procedure fpc_shortstr_assign(len:{$ifdef cpu16}smallint{$else}longint{$endif};sstr,dstr:pointer); compilerproc; procedure fpc_shortstr_to_shortstr(out res:shortstring; const sstr: shortstring); compilerproc; procedure fpc_shortstr_concat(var dests:shortstring;const s1,s2:shortstring);compilerproc; diff --git a/rtl/inc/generic.inc b/rtl/inc/generic.inc index d40d04e862..4ded841654 100644 --- a/rtl/inc/generic.inc +++ b/rtl/inc/generic.inc @@ -892,7 +892,7 @@ begin res[0]:=chr(slen); end; -procedure fpc_shortstr_assign(len:longint;sstr,dstr:pointer);[public,alias:'FPC_SHORTSTR_ASSIGN']; compilerproc; +procedure fpc_shortstr_assign(len:{$ifdef cpu16}smallint{$else}longint{$endif};sstr,dstr:pointer);[public,alias:'FPC_SHORTSTR_ASSIGN']; compilerproc; var slen : byte; begin