2011-04-01 14:19 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/vm/itemapi.c
    ! fixed compilation in MT mode with some C compilers using
      HB_STACK_TLS_PRELOAD
    * updated also hb_itemParamStore() function to set NIL to item passed
      by reference when is called with NULL pItem parameter.
This commit is contained in:
Przemyslaw Czerpak
2011-04-01 12:20:09 +00:00
parent 98ae698914
commit fe09f94163
2 changed files with 23 additions and 12 deletions

View File

@@ -16,6 +16,13 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-04-01 14:19 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/itemapi.c
! fixed compilation in MT mode with some C compilers using
HB_STACK_TLS_PRELOAD
* updated also hb_itemParamStore() function to set NIL to item passed
by reference when is called with NULL pItem parameter.
2011-04-01 13:56 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/itemapi.c
* set NIL to item passed by reference when hb_itemParamStoreForward()

View File

@@ -128,11 +128,13 @@ HB_BOOL hb_itemParamStore( HB_USHORT uiParam, PHB_ITEM pItem )
if( hb_param( uiParam, HB_IT_BYREF ) )
{
HB_STACK_TLS_PRELOAD
PHB_ITEM pDest = hb_stackItemFromBase( uiParam );
if( pItem )
{
HB_STACK_TLS_PRELOAD
hb_itemCopyToRef( hb_stackItemFromBase( uiParam ), pItem );
}
hb_itemCopyToRef( pDest, pItem );
else
hb_itemSetNil( pDest );
return HB_TRUE;
}
@@ -145,13 +147,13 @@ HB_BOOL hb_itemParamStoreForward( HB_USHORT uiParam, PHB_ITEM pItem )
if( hb_param( uiParam, HB_IT_BYREF ) )
{
HB_STACK_TLS_PRELOAD
PHB_ITEM pDest = hb_stackItemFromBase( uiParam );
if( pItem )
{
HB_STACK_TLS_PRELOAD
hb_itemMoveToRef( hb_stackItemFromBase( uiParam ), pItem );
}
hb_itemMoveToRef( pDest, pItem );
else
hb_itemClear( hb_stackItemFromBase( uiParam ) );
hb_itemSetNil( pDest );
return HB_TRUE;
}
@@ -164,14 +166,16 @@ HB_BOOL hb_itemParamStoreRelease( HB_USHORT uiParam, PHB_ITEM pItem )
if( hb_param( uiParam, HB_IT_BYREF ) )
{
HB_STACK_TLS_PRELOAD
PHB_ITEM pDest = hb_stackItemFromBase( uiParam );
if( pItem )
{
HB_STACK_TLS_PRELOAD
hb_itemMoveToRef( hb_stackItemFromBase( uiParam ), pItem );
hb_itemMoveToRef( pDest, pItem );
hb_itemRelease( pItem );
}
else
hb_itemClear( hb_stackItemFromBase( uiParam ) );
hb_itemSetNil( pDest );
return HB_TRUE;
}