From 1d4208e6e15715f3626cb61e1c90e0bfdf7e4599 Mon Sep 17 00:00:00 2001 From: Jean-Francois Lefebvre Date: Wed, 10 Oct 2001 21:44:23 +0000 Subject: [PATCH] 2001-10-10 23:50 GMT+1 JFL (mafact) --- harbour/ChangeLog | 5 +++++ harbour/source/vm/classes.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8eb6ddef6d..3ab586c3e9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2001-10-10 23:50 GMT+1 JFL (mafact) + * harbour/source/vm/classes.c + Fixed hb_clsIsParent for same class as parent ... + (xBase++ compatibility) + 2001-10-10 10:07 GMT Dave Pearson * source/rtl/tbrowse.prg * Fixed bug in :insColumn() as reported by Andreas Moroder in diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index 1231c20bc4..3b04d1034d 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -1,4 +1,4 @@ -/* +/* * $Id$ */ @@ -102,6 +102,7 @@ * Adding HB_CLS_ENFORCERO FLAG to disable Write access to RO VAR * outside of Constructors /!\ Could be related to some incompatibility * Added hb_objGetRealClsName to keep a full class tree + * Fixed hb_clsIsParent * * See doc/license.txt for licensing terms. * @@ -530,6 +531,9 @@ BOOL hb_clsIsParent( PCLASS pClass, char * szParentName ) uiLimit = ( USHORT ) ( pClass->uiHashKey * BUCKET ); + if( strcmp( pClass->szName, szParentName ) == 0 ) + return TRUE; + for( uiAt = 0; uiAt < uiLimit; uiAt++) { if( ( pClass->pMethods[ uiAt ].uiScope & HB_OO_CLSTP_CLASS ) == HB_OO_CLSTP_CLASS )