Use constref instead of const when passing TEntryInformation along

git-svn-id: trunk@33951 -
This commit is contained in:
svenbarth 2016-06-11 20:45:47 +00:00
parent 535621faaa
commit 3f45860cf9
6 changed files with 10 additions and 10 deletions

View File

@ -78,13 +78,13 @@ Implementation
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
{$define FPC_SYSTEM_HAS_OSSETUPENTRYINFORMATION}
procedure OsSetupEntryInformation(const info: TEntryInformation); forward;
procedure OsSetupEntryInformation(constref info: TEntryInformation); forward;
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
{$I system.inc}
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
procedure OsSetupEntryInformation(const info: TEntryInformation);
procedure OsSetupEntryInformation(constref info: TEntryInformation);
begin
argc := info.OS.argc;
argv := info.OS.argv;

View File

@ -121,7 +121,7 @@ var
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
procedure SetupEntryInformation(const info: TEntryInformation);[public,alias:'_FPC_SetupEntryInformation'];
procedure SetupEntryInformation(constref info: TEntryInformation);[public,alias:'_FPC_SetupEntryInformation'];
begin
EntryInformation := info;
FPCResStrInitTables := info.ResStrInitTables;

View File

@ -52,7 +52,7 @@ procedure SysAllocateThreadVars; external name '_FPC_SysAllocateThreadVars';
procedure InitHeap; external name '_FPC_InitHeap';
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
procedure SetupEntryInformation(const info: TEntryInformation); external name '_FPC_SetupEntryInformation';
procedure SetupEntryInformation(constref info: TEntryInformation); external name '_FPC_SetupEntryInformation';
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
{$endif FPC_INSSIDE_SYSINIT}

View File

@ -356,7 +356,7 @@ Var
DLLInitState : Longint = -1;
DLLBuf : Jmp_buf;
function Dll_entry{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}(const info : TEntryInformation){$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION} : longbool; [public,alias:'_FPC_DLL_Entry'];
function Dll_entry{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}(constref info : TEntryInformation){$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION} : longbool; [public,alias:'_FPC_DLL_Entry'];
begin
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
SetupEntryInformation(info);

View File

@ -42,8 +42,8 @@
tls_callback: pointer; external name '__FPC_tls_callbacks';
{$endif FPC_USE_TLS_DIRECTORY}
procedure EXE_Entry(const info : TEntryInformation); external name '_FPC_EXE_Entry';
function DLL_Entry(const info : TEntryInformation) : longbool; external name '_FPC_DLL_Entry';
procedure EXE_Entry(constref info : TEntryInformation); external name '_FPC_EXE_Entry';
function DLL_Entry(constref info : TEntryInformation) : longbool; external name '_FPC_DLL_Entry';
procedure PascalMain;external name 'PASCALMAIN';
function GetStdHandle(nStdHandle:DWORD) : THandle; stdcall; external 'kernel32' name 'GetStdHandle';

View File

@ -114,7 +114,7 @@ var
FPCSysInstance : PLongint;public name '_FPC_SysInstance';
{$define FPC_SYSTEM_HAS_OSSETUPENTRYINFORMATION}
procedure OsSetupEntryInformation(const info: TEntryInformation); forward;
procedure OsSetupEntryInformation(constref info: TEntryInformation); forward;
{$ifdef FPC_USE_WIN32_SEH}
function main_wrapper(arg: Pointer; proc: Pointer): ptrint; forward;
@ -133,7 +133,7 @@ end;
{ include code common with win64 }
{$I syswin.inc}
procedure OsSetupEntryInformation(const info: TEntryInformation);
procedure OsSetupEntryInformation(constref info: TEntryInformation);
begin
TlsKey := info.OS.TlsKeyAddr;
FPCSysInstance := info.OS.SysInstance;
@ -191,7 +191,7 @@ var
to check if the call stack can be written on exceptions }
_SS : Cardinal;
procedure Exe_entry(const info : TEntryInformation);[public,alias:'_FPC_EXE_Entry'];
procedure Exe_entry(constref info : TEntryInformation);[public,alias:'_FPC_EXE_Entry'];
var
xframe: TEXCEPTION_FRAME;
begin