Delphi compatibility
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1169 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
83d29760ee
commit
8aa02153fc
@ -45,9 +45,10 @@
|
||||
{$UNDEF USE_INLINE}
|
||||
{$DEFINE WST_RECORD_RTTI}
|
||||
{$DEFINE WST_INTF_DOM}
|
||||
{$IFDEF VER150}
|
||||
{$DEFINE HAS_FORMAT_SETTINGS}
|
||||
{$ENDIF}
|
||||
{$DEFINE HAS_FORMAT_SETTINGS}
|
||||
{$IFDEF VER140}
|
||||
{$UNDEF HAS_FORMAT_SETTINGS}
|
||||
{$ENDIF}
|
||||
{$IFDEF VER200} // Delphi 2009
|
||||
{$DEFINE HAS_BUILT_IN_64UINT}
|
||||
{$DEFINE WST_UNICODESTRING}
|
||||
|
@ -1,7 +1,6 @@
|
||||
{$INCLUDE wst_global.inc}
|
||||
unit wst_initialization;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
@ -38,15 +37,15 @@ end;
|
||||
procedure wst_add_init_proc(const AProc : TwstInitializationProc);
|
||||
begin
|
||||
wst_prepare();
|
||||
if ( AProc <> nil ) and ( InitProcs.IndexOf(AProc) = -1 ) then
|
||||
InitProcs.Add(AProc);
|
||||
if Assigned(AProc) and ( InitProcs.IndexOf(@AProc) = -1 ) then
|
||||
InitProcs.Add(@AProc);
|
||||
end;
|
||||
|
||||
procedure wst_add_final_proc(const AProc : TwstFinalizationProc);
|
||||
begin
|
||||
wst_prepare();
|
||||
if ( AProc <> nil ) and ( FinalProcs.IndexOf(AProc) = -1 ) then
|
||||
FinalProcs.Add(AProc);
|
||||
if ( @AProc <> nil ) and ( FinalProcs.IndexOf(@AProc) = -1 ) then
|
||||
FinalProcs.Add(@AProc);
|
||||
end;
|
||||
|
||||
procedure wst_add_procs(const AInitProc : TwstInitializationProc; const AFinalProc : TwstFinalizationProc);
|
||||
@ -88,6 +87,7 @@ begin
|
||||
FreeAndNil(InitProcs);
|
||||
end;
|
||||
|
||||
initialization
|
||||
finalization
|
||||
wst_finalize();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user