2001-07-23 22:35 UTC+0100 Lubos Janica <janicalubos@yahoo.com>

* classes.c
       Fixed function __CLSNEW.
       Changed variable USHORT uiSize to ULONG ulSize
       This fix random GPFs in function hb_clsDictRealloc by creating
       classes.
This commit is contained in:
Lubos Janica
2001-07-23 20:51:32 +00:00
parent 2018498c23
commit 1be4191464
2 changed files with 14 additions and 5 deletions

View File

@@ -1,3 +1,10 @@
2001-07-23 22:35 UTC+0100 Lubos Janica <janicalubos@yahoo.com>
* classes.c
Fixed function __CLSNEW.
Changed variable USHORT uiSize to ULONG ulSize
This fix random GPFs in function hb_clsDictRealloc by creating
classes.
2001-07-23 21:29 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu>
* source/rtl/tbrowse.prg

View File

@@ -1079,7 +1079,9 @@ HB_FUNC( __CLSADDMSG )
HB_FUNC( __CLSNEW )
{
PCLASS pNewCls;
USHORT uiSize;
ULONG ulSize; /* USHORT is small. Maximum 409 methods. In some
cases it is enough. This eliminate random GPFs
in this function for big classes */
PHB_ITEM pahSuper;
USHORT i, uiSuper;
@@ -1183,9 +1185,9 @@ HB_FUNC( __CLSNEW )
if( i == 1 )
{
uiSize = ( USHORT ) ( pNewCls->uiHashKey * BUCKET * sizeof( METHOD ) );
pNewCls->pMethods = ( PMETHOD ) hb_xgrab( uiSize );
memset( pNewCls->pMethods, 0, uiSize );
ulSize = pNewCls->uiHashKey * BUCKET * sizeof( METHOD );
pNewCls->pMethods = ( PMETHOD ) hb_xgrab( ulSize );
memset( pNewCls->pMethods, 0, ulSize );
pNewCls->pFunError = pSprCls->pFunError;
}
@@ -2333,4 +2335,4 @@ void hb_mthAddTime( void * pMethod, ULONG ulClockTicks )
{
if( pMethod != NULL )
( ( PMETHOD ) pMethod )->ulTime += ulClockTicks;
}
}