19991020-13:27 GMT+1

This commit is contained in:
Viktor Szakats
1999-10-20 11:45:46 +00:00
parent f35ae58efd
commit fd5a1cf92f
5 changed files with 33 additions and 21 deletions

View File

@@ -1,3 +1,15 @@
19991020-13:27 GMT+1 Victor Szel <info@szelvesz.hu>
* include/extend.h
source/rtl/arrays.c
source/rtl/classes.c
source/vm/hvm.c
* Name change, to avoid possible collision.
BASEARRAY -> HB_BASEARRAY
PBASEARRAY -> PHB_BASEARRAY
BASEARRAY_PTR -> HB_BASEARRAY_PTR
NOTE: HB_ARRAY would be a better name, but that would collide with
the Harbour function HB_ARRAY (ARRAY()).
19991020-12:59 GMT+1 Victor Szel <info@szelvesz.hu>
* include/hbdefs.h
source/pp/hbpplib.c

View File

@@ -201,7 +201,7 @@ typedef struct _HB_BASEARRAY
USHORT uiClass; /* offset to the classes base if it is an object */
USHORT uiPrevCls; /* for fixing after access super */
BOOL bSuperCast; /* is it a super cast ? */
} BASEARRAY, * PBASEARRAY, * BASEARRAY_PTR;
} HB_BASEARRAY, * PHB_BASEARRAY, * HB_BASEARRAY_PTR;
/* stack managed by the virtual machine */
typedef struct

View File

@@ -59,7 +59,7 @@
BOOL hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) /* creates a new array */
{
PBASEARRAY pBaseArray = ( PBASEARRAY ) hb_xgrab( sizeof( BASEARRAY ) );
PHB_BASEARRAY pBaseArray = ( PHB_BASEARRAY ) hb_xgrab( sizeof( HB_BASEARRAY ) );
ULONG ulPos;
hb_itemClear( pItem );
@@ -88,12 +88,12 @@ BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue )
{
if( IS_ARRAY( pArray ) )
{
PBASEARRAY pBaseArray = ( PBASEARRAY ) pArray->item.asArray.value;
PHB_BASEARRAY pBaseArray = ( PHB_BASEARRAY ) pArray->item.asArray.value;
if( pBaseArray->ulLen < ULONG_MAX )
{
hb_arraySize( pArray, pBaseArray->ulLen + 1 );
pBaseArray = ( PBASEARRAY ) pArray->item.asArray.value;
pBaseArray = ( PHB_BASEARRAY ) pArray->item.asArray.value;
hb_itemCopy( pBaseArray->pItems + ( pBaseArray->ulLen - 1 ), pValue );
return TRUE;
@@ -123,7 +123,7 @@ BOOL hb_arraySize( PHB_ITEM pArray, ULONG ulLen )
{
if( IS_ARRAY( pArray ) )
{
PBASEARRAY pBaseArray = pArray->item.asArray.value;
PHB_BASEARRAY pBaseArray = pArray->item.asArray.value;
ULONG ulPos;
if( ! pBaseArray->ulLen )
@@ -175,7 +175,7 @@ BOOL hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex )
if( ulIndex > 0 && ulIndex <= ulLen )
{
PBASEARRAY pBaseArray = pArray->item.asArray.value;
PHB_BASEARRAY pBaseArray = pArray->item.asArray.value;
hb_itemClear( pBaseArray->pItems + ( ulIndex - 1 ) );
@@ -199,7 +199,7 @@ BOOL hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex )
if( ulIndex > 0 && ulIndex <= ulLen )
{
PBASEARRAY pBaseArray = pArray->item.asArray.value;
PHB_BASEARRAY pBaseArray = pArray->item.asArray.value;
hb_itemClear( pBaseArray->pItems + ( ulLen - 1 ) );
@@ -401,7 +401,7 @@ BOOL hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG * p
{
if( IS_ARRAY( pArray ) )
{
PBASEARRAY pBaseArray = pArray->item.asArray.value;
PHB_BASEARRAY pBaseArray = pArray->item.asArray.value;
ULONG ulLen = pBaseArray->ulLen;
ULONG ulStart;
ULONG ulCount;
@@ -435,7 +435,7 @@ ULONG hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG *
{
if( IS_ARRAY( pArray ) )
{
PBASEARRAY pBaseArray = pArray->item.asArray.value;
PHB_BASEARRAY pBaseArray = pArray->item.asArray.value;
ULONG ulLen = pBaseArray->ulLen;
ULONG ulStart;
ULONG ulCount;
@@ -538,7 +538,7 @@ BOOL hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, ULONG * pulStart, ULONG * p
{
if( IS_ARRAY( pArray ) && IS_BLOCK( bBlock ) )
{
PBASEARRAY pBaseArray = pArray->item.asArray.value;
PHB_BASEARRAY pBaseArray = pArray->item.asArray.value;
ULONG ulLen = pBaseArray->ulLen;
ULONG ulStart;
ULONG ulCount;
@@ -580,7 +580,7 @@ BOOL hb_arrayRelease( PHB_ITEM pArray )
{
if( IS_ARRAY( pArray ) )
{
PBASEARRAY pBaseArray = pArray->item.asArray.value;
PHB_BASEARRAY pBaseArray = pArray->item.asArray.value;
ULONG ulLen = pBaseArray->ulLen;
ULONG ulPos;
@@ -608,8 +608,8 @@ BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, ULONG * pulStart,
{
if( IS_ARRAY( pSrcArray ) && IS_ARRAY( pDstArray ) )
{
PBASEARRAY pSrcBaseArray = pSrcArray->item.asArray.value;
PBASEARRAY pDstBaseArray = pDstArray->item.asArray.value;
PHB_BASEARRAY pSrcBaseArray = pSrcArray->item.asArray.value;
PHB_BASEARRAY pDstBaseArray = pDstArray->item.asArray.value;
ULONG ulSrcLen = pSrcBaseArray->ulLen;
ULONG ulDstLen = pDstBaseArray->ulLen;
ULONG ulStart;
@@ -671,8 +671,8 @@ PHB_ITEM hb_arrayClone( PHB_ITEM pSrcArray )
if( IS_ARRAY( pSrcArray ) )
{
PBASEARRAY pSrcBaseArray = pSrcArray->item.asArray.value;
PBASEARRAY pDstBaseArray;
PHB_BASEARRAY pSrcBaseArray = pSrcArray->item.asArray.value;
PHB_BASEARRAY pDstBaseArray;
ULONG ulSrcLen = pSrcBaseArray->ulLen;
ULONG ulCount;

View File

@@ -1132,13 +1132,13 @@ static HARBOUR hb___msgGetData( void )
*/
static HARBOUR hb___msgSuper( void )
{
PHB_ITEM pObject = hb_stack.pBase + 1;
PHB_ITEM pSuper = ( PHB_ITEM ) hb_xgrab( sizeof( HB_ITEM ) );
PBASEARRAY pNewBase = ( PBASEARRAY ) hb_xgrab( sizeof( BASEARRAY ) );
USHORT uiSuperCls = s_pMethod->uiData; /* Get handle of superclass */
PHB_ITEM pObject = hb_stack.pBase + 1;
PHB_ITEM pSuper = ( PHB_ITEM ) hb_xgrab( sizeof( HB_ITEM ) );
PHB_BASEARRAY pNewBase = ( PHB_BASEARRAY ) hb_xgrab( sizeof( HB_BASEARRAY ) );
USHORT uiSuperCls = s_pMethod->uiData; /* Get handle of superclass */
memcpy( pSuper, pObject, sizeof( HB_ITEM ) ); /* Allocate new structures */
memcpy( pNewBase, pObject->item.asArray.value, sizeof( BASEARRAY ) );
memcpy( pNewBase, pObject->item.asArray.value, sizeof( HB_BASEARRAY ) );
pSuper->item.asArray.value = pNewBase;

View File

@@ -2207,7 +2207,7 @@ void hb_vmDo( USHORT uiParams )
LONG wStackBase = hb_stack.pBase - hb_stack.pItems; /* as the stack memory block could change */
LONG wItemIndex = pItem - hb_stack.pItems;
PHB_ITEM pSelf = hb_stack.pPos - uiParams - 1; /* NIL, OBJECT or BLOCK */
PBASEARRAY pSelfBase;
PHB_BASEARRAY pSelfBase;
PHB_FUNC pFunc;
int iStatics = hb_stack.iStatics; /* Return iStatics position */
BOOL bDebugPrevState = s_bDebugging;