Explorar o código

Use constref instead of const when passing TEntryInformation along

git-svn-id: trunk@33951 -
svenbarth %!s(int64=9) %!d(string=hai) anos
pai
achega
3f45860cf9
Modificáronse 6 ficheiros con 10 adicións e 10 borrados
  1. 2 2
      rtl/bsd/system.pp
  2. 1 1
      rtl/inc/system.inc
  3. 1 1
      rtl/win/systlsdir.inc
  4. 1 1
      rtl/win/syswin.inc
  5. 2 2
      rtl/win32/sysinit.inc
  6. 3 3
      rtl/win32/system.pp

+ 2 - 2
rtl/bsd/system.pp

@@ -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;

+ 1 - 1
rtl/inc/system.inc

@@ -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;

+ 1 - 1
rtl/win/systlsdir.inc

@@ -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}

+ 1 - 1
rtl/win/syswin.inc

@@ -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);

+ 2 - 2
rtl/win32/sysinit.inc

@@ -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';

+ 3 - 3
rtl/win32/system.pp

@@ -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