See changelog

This commit is contained in:
Eddie Runia
1999-05-15 18:44:49 +00:00
parent adf88adf4b
commit 949171bc3c
3 changed files with 19 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
19990515-19:40 CET Eddie Runia
* source/rtl/classes.c, source/rtl/arrays.c
oClone added (actually : aClone can handle both :-)
19990515-16:20 CET Eddie Runia
* source/compiler/harbour.y
Jump optimalization caused return to fail. Optimalization removed.

View File

@@ -535,6 +535,7 @@ PITEM hb_arrayClone( PITEM pSrcArray )
pSrcBaseArray = ( PBASEARRAY )pSrcArray->value.pBaseArray;
pDstBaseArray = ( PBASEARRAY )pDstArray->value.pBaseArray;
pDstBaseArray->wClass = pSrcBaseArray->wClass;
for ( ulCount = 0; ulCount < ulSrcLen; ulCount ++ )
{

View File

@@ -11,6 +11,7 @@ void PushSymbol( PSYMBOL );
void Message( PSYMBOL );
void Do( WORD wParams );
void hb_arrayDel( PITEM, ULONG );
PITEM hb_arrayClone( PITEM );
#define MET_METHOD 0
#define MET_DATA 1
@@ -637,3 +638,16 @@ HARBOUR CLASSDEL() /* Delete message (only for INLINE and METHOD) */
}
}
HARBOUR OCLONE( void )
{
PITEM pSrcObject = _param( 1, IT_OBJECT );
if ( pSrcObject )
{
PITEM pDstObject = hb_arrayClone( pSrcObject );
ItemCopy( &stack.Return, pDstObject ); /* OClone() returns the new object */
}
else
_ret();
}