Browse Source

* fixed currentframe,previousframe
+ testcall to test the callspec unit

peter 27 years ago
parent
commit
10d267e9fc
1 changed files with 9 additions and 5 deletions
  1. 9 5
      rtl/inc/objects.pp

+ 9 - 5
rtl/inc/objects.pp

@@ -724,7 +724,7 @@ type
   PointerConstructor = function(VMT: pointer; Obj: pointer; Param1: pointer): pointer;
   PointerConstructor = function(VMT: pointer; Obj: pointer; Param1: pointer): pointer;
   PointerMethod = function(Obj: pointer; Param1: pointer): pointer;
   PointerMethod = function(Obj: pointer; Param1: pointer): pointer;
 
 
-function CurrentFramePointer: FramePointer;assembler;
+function PreviousFramePointer: FramePointer;assembler;
 asm
 asm
 {$ifdef i386}
 {$ifdef i386}
     movl (%ebp), %eax
     movl (%ebp), %eax
@@ -1706,7 +1706,7 @@ VAR I: LongInt;
 BEGIN
 BEGIN
    For I := Count DownTo 1 Do
    For I := Count DownTo 1 Do
      Begin                   { Down from last item }
      Begin                   { Down from last item }
-       IF CallPointerLocal(Test,CurrentFramePointer,Items^[I-1])<>NIL THEN
+       IF CallPointerLocal(Test,PreviousFramePointer,Items^[I-1])<>NIL THEN
        Begin          { Test each item }
        Begin          { Test each item }
          LastThat := Items^[I-1];                     { Return item }
          LastThat := Items^[I-1];                     { Return item }
          Exit;                                        { Now exit }
          Exit;                                        { Now exit }
@@ -1722,7 +1722,7 @@ FUNCTION TCollection.FirstThat (Test: Pointer): Pointer;
 VAR I: LongInt;
 VAR I: LongInt;
 BEGIN
 BEGIN
    For I := 1 To Count Do Begin                       { Up from first item }
    For I := 1 To Count Do Begin                       { Up from first item }
-     IF CallPointerLocal(Test,CurrentFramePointer,Items^[I-1])<>NIL THEN
+     IF CallPointerLocal(Test,PreviousFramePointer,Items^[I-1])<>NIL THEN
        Begin          { Test each item }
        Begin          { Test each item }
        FirstThat := Items^[I-1];                      { Return item }
        FirstThat := Items^[I-1];                      { Return item }
        Exit;                                          { Now exit }
        Exit;                                          { Now exit }
@@ -1835,7 +1835,7 @@ PROCEDURE TCollection.ForEach (Action: Pointer);
 VAR I: LongInt;
 VAR I: LongInt;
 BEGIN
 BEGIN
    For I := 1 To Count Do                             { Up from first item }
    For I := 1 To Count Do                             { Up from first item }
-    CallPointerLocal(Action,CurrentFramePointer,Items^[I-1]);   { Call with each item }
+    CallPointerLocal(Action,PreviousFramePointer,Items^[I-1]);   { Call with each item }
 END;
 END;
 
 
 {--TCollection--------------------------------------------------------------}
 {--TCollection--------------------------------------------------------------}
@@ -2684,7 +2684,11 @@ END;
 END.
 END.
 {
 {
   $Log$
   $Log$
-  Revision 1.17  1998-12-16 00:22:25  peter
+  Revision 1.18  1998-12-16 21:57:20  peter
+    * fixed currentframe,previousframe
+    + testcall to test the callspec unit
+
+  Revision 1.17  1998/12/16 00:22:25  peter
     * more temp symbols removed
     * more temp symbols removed
 
 
   Revision 1.16  1998/12/08 10:11:27  peter
   Revision 1.16  1998/12/08 10:11:27  peter