Files
harbour-core/harbour/tests/broken/classes.dif
1999-05-12 22:49:17 +00:00

41 lines
1.3 KiB
Plaintext

--- \source\tcpp\cvstest\harbour\source\rtl\classes.c Tue May 11 20:23:38 1999
+++ \source\tcpp\harb21-2\source\rtl\classes.c Wed May 12 23:21:24 1999
@@ -136,12 +136,22 @@
static HARBOUR GetData( void )
{
- ArrayGet( stack.pBase + 1, pMethod->wData, &stack.Return );
+ PITEM pObject = stack.pBase + 1;
+ WORD wIndex = pMethod->wData;
+
+ if( wIndex > ArrayLen ( pObject ) ) /* Resize needed */
+ ArraySize( pObject, wIndex ); /* Make large enough */
+ ArrayGet( pObject, wIndex, &stack.Return );
}
static HARBOUR SetData( void )
{
- ArraySet( stack.pBase + 1, pMethod->wData, stack.pBase + 2 );
+ PITEM pObject = stack.pBase + 1;
+ WORD wIndex = pMethod->wData;
+
+ if( wIndex > ArrayLen( pObject ) ) /* Resize needed */
+ ArraySize( pObject, wIndex ); /* Make large enough */
+ ArraySet( pObject, wIndex, stack.pBase + 2 );
}
static HARBOUR GetClassData( void )
@@ -505,4 +515,12 @@
}
}
+HARBOUR __WDATAINC() /* <nSeq> = __wDataInc( <hClass> )*/
+{
+ WORD wClass = _parnl( 1 );
+
+ if( wClass )
+ _retni( ++pClasses[ wClass - 1 ].wDatas ); /* Return and increase */
+} /* number of DATAs */
+