From 59e84ac06dbef29b9171f9dfe20fc245d266077a Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 18 Oct 2006 20:31:25 +0000 Subject: [PATCH] * force stackframes for foreach,firstthat,lastthat git-svn-id: trunk@4967 - --- rtl/inc/objects.pp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/rtl/inc/objects.pp b/rtl/inc/objects.pp index 028d7b2929..949ce2dde0 100644 --- a/rtl/inc/objects.pp +++ b/rtl/inc/objects.pp @@ -1902,6 +1902,12 @@ END; {--TCollection--------------------------------------------------------------} { LastThat -> Platforms DOS/DPMI/WIN/OS2 - Checked 22May96 LdB } {---------------------------------------------------------------------------} + +{$IFOPT W-} +{$DEFINE STACKFRAME_OFF} +{$W+} +{$ENDIF} + FUNCTION TCollection.LastThat (Test: Pointer): Pointer; VAR I: LongInt; @@ -1917,6 +1923,7 @@ BEGIN LastThat := Nil; { None passed test } END; + {--TCollection--------------------------------------------------------------} { FirstThat -> Platforms DOS/DPMI/WIN/OS2 - Checked 22May96 LdB } {---------------------------------------------------------------------------} @@ -1933,6 +1940,11 @@ BEGIN FirstThat := Nil; { None passed test } END; +{$IFDEF STACKFRAME_OFF} +{$UNDEF STACKFRAME_OFF} +{$W-} +{$ENDIF} + {--TCollection--------------------------------------------------------------} { Pack -> Platforms DOS/DPMI/WIN/OS2 - Checked 22May96 LdB } {---------------------------------------------------------------------------} @@ -2034,12 +2046,22 @@ END; {--TCollection--------------------------------------------------------------} { ForEach -> Platforms DOS/DPMI/WIN/OS2 - Checked 22May96 LdB } {---------------------------------------------------------------------------} + +{$IFOPT W-} +{$DEFINE STACKFRAME_OFF} +{$W+} +{$ENDIF} PROCEDURE TCollection.ForEach (Action: Pointer); VAR I: LongInt; BEGIN For I := 1 To Count Do { Up from first item } CallPointerLocal(Action,get_caller_frame(get_frame),Items^[I-1]); { Call with each item } END; +{$IFDEF STACKFRAME_OFF} +{$UNDEF STACKFRAME_OFF} +{$W-} +{$ENDIF} + {--TCollection--------------------------------------------------------------} { SetLimit -> Platforms DOS/DPMI/WIN/OS2 - Checked 22May96 LdB }