From fd5a1cf92f7aa07503a54338c4bba7eb98227250 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 20 Oct 1999 11:45:46 +0000 Subject: [PATCH] 19991020-13:27 GMT+1 --- harbour/ChangeLog | 12 ++++++++++++ harbour/include/extend.h | 2 +- harbour/source/rtl/arrays.c | 28 ++++++++++++++-------------- harbour/source/rtl/classes.c | 10 +++++----- harbour/source/vm/hvm.c | 2 +- 5 files changed, 33 insertions(+), 21 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index adc9fc6d9d..e321cd54c3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,15 @@ +19991020-13:27 GMT+1 Victor Szel + * 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 * include/hbdefs.h source/pp/hbpplib.c diff --git a/harbour/include/extend.h b/harbour/include/extend.h index 3b22a78930..f4e0f7da93 100644 --- a/harbour/include/extend.h +++ b/harbour/include/extend.h @@ -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 diff --git a/harbour/source/rtl/arrays.c b/harbour/source/rtl/arrays.c index 7976b7975d..7d78380021 100644 --- a/harbour/source/rtl/arrays.c +++ b/harbour/source/rtl/arrays.c @@ -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; diff --git a/harbour/source/rtl/classes.c b/harbour/source/rtl/classes.c index a2895e3408..b20031e364 100644 --- a/harbour/source/rtl/classes.c +++ b/harbour/source/rtl/classes.c @@ -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; diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index a4478f67b6..e68c77afba 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -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;