Disregard my prev mail (the fix is committed).

On 2008.08.09., at 14:27, Szakáts Viktor wrote:

Hi Przemek, Teo,

Reading some backlog, I've found this. I wonder if this
has been committed since, or should we now?

Brgds,
Viktor

On 2008.03.04., at 13:59, Przemyslaw Czerpak wrote:

On Tue, 04 Mar 2008, Teo Fonrouge wrote:
Hello,
In a set of inherited classes, the DESTRUCTOR procedure is called more than
one time if a parent class, has a DESTRUCTOR.
I think that this is incorrect behavior. Acceptable only when each parent
class has his own DESTRUCTOR.

Below is patch which fixes it. I'll commit it after new release.

best regards,
Przemek


Index: harbour/source/vm/classes.c
===================================================================
--- harbour/source/vm/classes.c (wersja 8313)
+++ harbour/source/vm/classes.c (kopia robocza)
@@ -2041,11 +2041,20 @@
  {
     if( pbClasses[ uiClass ] == 1 )
     {
-         hb_vmPushSymbol( &s___msgDestructor );
- hb_clsMakeSuperObject( hb_stackAllocItem(), pObject, uiClass );
-         hb_vmSend( 0 );
-         if( hb_vmRequestQuery() != 0 )
-            break;
+ PMETHOD pDestructor = hb_clsFindMsg( &s_pClasses[ uiClass ], + s___msgDestructor.pDynSym );
+         if( pDestructor )
+         {
+            if( pbClasses[ pDestructor->uiSprClass ] == 1 )
+            {
+               hb_vmPushSymbol( &s___msgDestructor );
+ hb_clsMakeSuperObject( hb_stackAllocItem(), pObject, uiClass );
+               hb_vmSend( 0 );
+               if( hb_vmRequestQuery() != 0 )
+                  break;
+               pbClasses[ pDestructor->uiSprClass ] |= 2;
+            }
+         }
     }
  }

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to