2009-12-21 23:29 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbapi.h
  * harbour/src/vm/garbage.c
    - removed function hb_gcRefDec()
    * functions hb_gcRefInc() and hb_gcRefFree() moved to public API
      After recent modifications in GC which introduced user defined
      mark functions it's reasonable to make these function public to
      extend functionality and give GC full interface to user defined
      blocks.
This commit is contained in:
Przemyslaw Czerpak
2009-12-21 22:29:58 +00:00
parent 6c75734a3c
commit a30828ee08
3 changed files with 12 additions and 11 deletions

View File

@@ -17,6 +17,16 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-21 23:29 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/src/vm/garbage.c
- removed function hb_gcRefDec()
* functions hb_gcRefInc() and hb_gcRefFree() moved to public API
After recent modifications in GC which introduced user defined
mark functions it's reasonable to make these function public to
extend functionality and give GC full interface to user defined
blocks.
2009-12-21 23:19 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/rddsql/hbrddsql.h
* harbour/contrib/rddsql/sqlbase.c

View File

@@ -583,6 +583,8 @@ extern HB_EXPORT void hb_gcFree( void * pAlloc ); /* deallocates a memory a
extern HB_EXPORT void * hb_gcLock( void * pAlloc ); /* do not release passed memory block */
extern HB_EXPORT void * hb_gcUnlock( void * pAlloc ); /* passed block is allowed to be released */
extern HB_EXPORT void hb_gcMark( void * pAlloc ); /* mark given block as used */
extern HB_EXPORT void hb_gcRefInc( void * pAlloc ); /* increment reference counter */
extern HB_EXPORT void hb_gcRefFree( void * pAlloc ); /* decrement reference counter and free the block when 0 reached */
extern HB_EXPORT void hb_gcDummyMark( void * Cargo ); /* dummy GC mark function */
@@ -604,14 +606,10 @@ extern void hb_vmIsStaticRef( void ); /* hvm.c - mark all static variables
extern void hb_gcReleaseAll( void ); /* release all memory blocks unconditionally */
extern void hb_gcRefCheck( void * pBlock ); /* Check if block still cannot be access after destructor execution */
extern void hb_gcRefInc( void * pAlloc ); /* increment reference counter */
extern BOOL hb_gcRefDec( void * pAlloc ); /* decrement reference counter, return HB_TRUE when 0 reached */
extern void hb_gcRefFree( void * pAlloc ); /* decrement reference counter and free the block when 0 reached */
extern HB_COUNTER hb_gcRefCount( void * pAlloc ); /* return number of references */
#if 0
#define hb_gcRefInc( p ) hb_xRefInc( HB_GC_PTR( p ) )
#define hb_gcRefDec( p ) hb_xRefDec( HB_GC_PTR( p ) )
#define hb_gcRefCount( p ) hb_xRefCount( HB_GC_PTR( p ) )
#define hb_gcFunc( p ) ( HB_GC_PTR( p )->pFunc )
#endif

View File

@@ -298,13 +298,6 @@ void hb_gcRefInc( void * pBlock )
hb_xRefInc( HB_GC_PTR( pBlock ) );
}
/* decrement reference counter, return TRUE when 0 reached */
#undef hb_gcRefDec
BOOL hb_gcRefDec( void * pBlock )
{
return hb_xRefDec( HB_GC_PTR( pBlock ) );
}
/* decrement reference counter and free the block when 0 reached */
#undef hb_gcRefFree
void hb_gcRefFree( void * pBlock )