2007-01-09 15:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/compiler/hbusage.c
    * update the year in hb_compPrintLogo() from 2006 to 2007

  * harbour/source/vm/garbage.c
    ! fixed potentially very serious bug - when I added array items
      references I forgot to update GC. Fortunately it was caught
      by code to detect bugs in object destructors so only RT error
      was reported instead of internal HVM memory corruption

  * harbour/tests/hbinline.prg
    * updated comments
This commit is contained in:
Przemyslaw Czerpak
2007-01-09 14:10:22 +00:00
parent 5f4b086a86
commit 30f56abce2
4 changed files with 41 additions and 6 deletions

View File

@@ -8,6 +8,19 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2007-01-09 15:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/hbusage.c
* update the year in hb_compPrintLogo() from 2006 to 2007
* harbour/source/vm/garbage.c
! fixed potentially very serious bug - when I added array items
references I forgot to update GC. Fortunately it was caught
by code to detect bugs in object destructors so only RT error
was reported instead of internal HVM memory corruption
* harbour/tests/hbinline.prg
* updated comments
2007-01-09 10:56 UTC+0200 Chen Kedem <niki@actcom.co.il>
* doc/whatsnew.txt
+ Add changes for the new beta build.

View File

@@ -192,6 +192,6 @@ void hb_compPrintLogo( void )
char * szVer = hb_verHarbour();
printf( "%s\n", szVer );
printf( "Copyright 1999-2006, http://www.harbour-project.org/\n" );
printf( "Copyright 1999-2007, http://www.harbour-project.org/\n" );
hb_xfree( szVer );
}

View File

@@ -381,8 +381,31 @@ void * hb_gcUnlock( void * pBlock )
*/
void hb_gcItemRef( HB_ITEM_PTR pItem )
{
if( HB_IS_BYREF( pItem ) )
pItem = hb_itemUnRef( pItem );
while( HB_IS_BYREF( pItem ) )
{
if( HB_IS_ENUM( pItem ) )
return;
else if( ! HB_IS_MEMVAR( pItem ) &&
pItem->item.asRefer.offset == 0 &&
pItem->item.asRefer.value >= 0 )
{
/* array item reference */
HB_GARBAGE_PTR pAlloc = HB_GC_PTR( pItem->item.asRefer.BasePtr.array );
if( pAlloc->used == s_uUsedFlag )
{
ULONG ulSize = pItem->item.asRefer.BasePtr.array->ulLen;
pAlloc->used ^= HB_GC_USED_FLAG;
pItem = pItem->item.asRefer.BasePtr.array->pItems;
while( ulSize )
{
hb_gcItemRef( pItem++ );
--ulSize;
}
}
return;
}
pItem = hb_itemUnRefOnce( pItem );
}
if( HB_IS_ARRAY( pItem ) )
{

View File

@@ -4,8 +4,7 @@
/*
* Harbour Project source code:
* new Hb_inLine{} test
* compile it using -kcI Harbour compiler switch
* new Hb_inLine {} test
*
* Copyright 2006 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
@@ -15,7 +14,7 @@
proc main()
local hb_inLine := " (var) "
? hb_inLine{ hb_retc("inLine"); } + hb_inLine(" parameter ") {
? hb_inLine { hb_retc("inLine"); } + hb_inLine(" parameter ") {
hb_retc( hb_parc( 1 ) );
} + "!" + hb_inLine + hb_inLine() { hb_retc( ":-)" ); } + ;
hb_inLine() + "{}"