2012-05-22 16:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/src/vm/arrays.c
* allow to call hb_arrayId() with NULL parameter
* harbour/include/hbapiitm.h
* harbour/src/vm/itemapi.c
+ added internal HVM function hb_itemPutPtrRawGC() - it's
necessary for blocks allocated with hb_gcAllocRaw().
* harbour/src/vm/thread.c
! use hb_itemPutPtrRawGC() instead of hb_itemPutPtrGC()
It fixes internal errors (i.e. reported in build process)
after my previous commit.
This commit is contained in:
@@ -16,6 +16,18 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-05-22 16:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/src/vm/arrays.c
|
||||
* allow to call hb_arrayId() with NULL parameter
|
||||
* harbour/include/hbapiitm.h
|
||||
* harbour/src/vm/itemapi.c
|
||||
+ added internal HVM function hb_itemPutPtrRawGC() - it's
|
||||
necessary for blocks allocated with hb_gcAllocRaw().
|
||||
* harbour/src/vm/thread.c
|
||||
! use hb_itemPutPtrRawGC() instead of hb_itemPutPtrGC()
|
||||
It fixes internal errors (i.e. reported in build process)
|
||||
after my previous commit.
|
||||
|
||||
2012-05-22 14:42 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* INSTALL
|
||||
+ updated platform compatibility matrix to use Markdown markup
|
||||
|
||||
@@ -187,6 +187,8 @@ extern HB_EXPORT PHB_ITEM hb_itemDeserialize( const char ** pBufferPtr, HB_S
|
||||
|
||||
#if defined( _HB_API_INTERNAL_ )
|
||||
|
||||
extern PHB_ITEM hb_itemPutPtrRawGC( PHB_ITEM pItem, void * pValue );
|
||||
|
||||
# define hb_itemSetNil( item ) do { \
|
||||
if( HB_IS_COMPLEX( item ) ) \
|
||||
hb_itemClear( item ); \
|
||||
|
||||
@@ -315,7 +315,7 @@ HB_BOOL hb_arrayIsObject( PHB_ITEM pArray )
|
||||
/* retrives the array unique ID */
|
||||
void * hb_arrayId( PHB_ITEM pArray )
|
||||
{
|
||||
if( HB_IS_ARRAY( pArray ) )
|
||||
if( pArray && HB_IS_ARRAY( pArray ) )
|
||||
return ( void * ) pArray->item.asArray.value;
|
||||
else
|
||||
return NULL;
|
||||
|
||||
@@ -1384,6 +1384,26 @@ PHB_ITEM hb_itemPutPtrGC( PHB_ITEM pItem, void * pValue )
|
||||
return pItem;
|
||||
}
|
||||
|
||||
PHB_ITEM hb_itemPutPtrRawGC( PHB_ITEM pItem, void * pValue )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutPtrRawGC(%p, %p)", pItem, pValue));
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
if( HB_IS_COMPLEX( pItem ) )
|
||||
hb_itemClear( pItem );
|
||||
}
|
||||
else
|
||||
pItem = hb_itemNew( NULL );
|
||||
|
||||
pItem->type = HB_IT_POINTER;
|
||||
pItem->item.asPointer.value = pValue;
|
||||
pItem->item.asPointer.collect = HB_TRUE;
|
||||
pItem->item.asPointer.single = HB_FALSE;
|
||||
|
||||
return pItem;
|
||||
}
|
||||
|
||||
PHB_ITEM hb_itemPutSymbol( PHB_ITEM pItem, PHB_SYMB pSym )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutSymbol(%p,%p)", pItem, pSym));
|
||||
|
||||
@@ -1050,7 +1050,7 @@ PHB_THREADSTATE hb_threadStateNew( void )
|
||||
pThread = ( PHB_THREADSTATE )
|
||||
hb_gcAllocRaw( sizeof( HB_THREADSTATE ), &s_gcThreadFuncs );
|
||||
memset( pThread, 0, sizeof( HB_THREADSTATE ) );
|
||||
hb_itemPutPtrGC( pThItm, pThread );
|
||||
hb_itemPutPtrRawGC( pThItm, pThread );
|
||||
|
||||
pThread->pszCDP = HB_MACRO2STRING( HB_CODEPAGE_DEFAULT );
|
||||
pThread->pszLang = HB_MACRO2STRING( HB_LANG_DEFAULT );
|
||||
@@ -1792,7 +1792,7 @@ PHB_ITEM hb_threadMutexCreate( void )
|
||||
pItem = hb_itemNew( NULL );
|
||||
pMutex = ( PHB_MUTEX ) hb_gcAllocRaw( sizeof( HB_MUTEX ), &s_gcMutexFuncs );
|
||||
memset( pMutex, 0, sizeof( HB_MUTEX ) );
|
||||
pItem = hb_itemPutPtrGC( pItem, pMutex );
|
||||
pItem = hb_itemPutPtrRawGC( pItem, pMutex );
|
||||
|
||||
#if !defined( HB_MT_VM )
|
||||
/* nothing */
|
||||
|
||||
Reference in New Issue
Block a user