Browse Source

* fixed firstthat,lastthat

peter 27 years ago
parent
commit
3bda8b840d
1 changed files with 6 additions and 3 deletions
  1. 6 3
      rtl/inc/objects.pp

+ 6 - 3
rtl/inc/objects.pp

@@ -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,PreviousFramePointer,Items^[I-1])<>NIL THEN
+       IF Boolean(Longint(CallPointerLocal(Test,PreviousFramePointer,Items^[I-1]))) 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,PreviousFramePointer,Items^[I-1])<>NIL THEN
+     IF Boolean(Longint(CallPointerLocal(Test,PreviousFramePointer,Items^[I-1]))) 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 }
@@ -2684,7 +2684,10 @@ END;
 END.
 END.
 {
 {
   $Log$
   $Log$
-  Revision 1.18  1998-12-16 21:57:20  peter
+  Revision 1.19  1998-12-18 17:21:28  peter
+    * fixed firstthat,lastthat
+
+  Revision 1.18  1998/12/16 21:57:20  peter
     * fixed currentframe,previousframe
     * fixed currentframe,previousframe
     + testcall to test the callspec unit
     + testcall to test the callspec unit