From e80a2ad13d169e7c8d19558a663c0d935a8a8eea Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sat, 6 Mar 2010 22:44:51 +0000 Subject: [PATCH] 2010-03-06 23:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/evalhb.c * harbour/src/vm/asort.c * harbour/src/vm/hvm.c * harbour/src/vm/arrays.c * harbour/src/vm/thread.c * harbour/src/vm/eval.c * harbour/src/vm/classes.c * harbour/src/rtl/do.c * harbour/contrib/gtwvg/wvgwing.c * use hb_vmPushEvalSym() instead of hb_vmPushSymbol( &hb_symEval ) Please try to eliminate direct hb_symEval usage from 3-rd party code. --- harbour/ChangeLog | 13 +++++++++++++ harbour/contrib/gtwvg/wvgwing.c | 4 ++-- harbour/src/rtl/do.c | 2 +- harbour/src/vm/arrays.c | 6 +++--- harbour/src/vm/asort.c | 2 +- harbour/src/vm/classes.c | 2 +- harbour/src/vm/eval.c | 10 +++++----- harbour/src/vm/evalhb.c | 2 +- harbour/src/vm/hvm.c | 8 ++++---- harbour/src/vm/thread.c | 2 +- 10 files changed, 32 insertions(+), 19 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d819520cad..ad9ef123a2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-06 23:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/evalhb.c + * harbour/src/vm/asort.c + * harbour/src/vm/hvm.c + * harbour/src/vm/arrays.c + * harbour/src/vm/thread.c + * harbour/src/vm/eval.c + * harbour/src/vm/classes.c + * harbour/src/rtl/do.c + * harbour/contrib/gtwvg/wvgwing.c + * use hb_vmPushEvalSym() instead of hb_vmPushSymbol( &hb_symEval ) + Please try to eliminate direct hb_symEval usage from 3-rd party code. + 2010-03-06 21:27 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/compiler/gencc.c ! fixed wrongly used HB_LONG_{MAX,MIN} instead of LONG_{MAX,MIN}. diff --git a/harbour/contrib/gtwvg/wvgwing.c b/harbour/contrib/gtwvg/wvgwing.c index 7f77099ae0..0612b14e5a 100644 --- a/harbour/contrib/gtwvg/wvgwing.c +++ b/harbour/contrib/gtwvg/wvgwing.c @@ -835,7 +835,7 @@ BOOL CALLBACK WvgDialogProcChooseFont( HWND hwnd, UINT msg, WPARAM wParam, LPARA if( block ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( block ); hb_vmPushNumInt( ( HB_PTRDIFF ) hwnd ); hb_vmPushInteger( msg ); @@ -1196,7 +1196,7 @@ LRESULT CALLBACK ControlWindowProcedure( HWND hwnd, UINT msg, WPARAM wParam, LPA } else { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pBlock ); } hb_vmPushNumInt( ( HB_PTRDIFF ) hwnd ); diff --git a/harbour/src/rtl/do.c b/harbour/src/rtl/do.c index 2d94671f55..cb6a9a8655 100644 --- a/harbour/src/rtl/do.c +++ b/harbour/src/rtl/do.c @@ -85,7 +85,7 @@ HB_FUNC( DO ) } else if( HB_IS_BLOCK( pItem ) ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); pSelf = pItem; } else if( HB_IS_SYMBOL( pItem ) ) diff --git a/harbour/src/vm/arrays.c b/harbour/src/vm/arrays.c index 5512fa8ae6..00ef5e4fd1 100644 --- a/harbour/src/vm/arrays.c +++ b/harbour/src/vm/arrays.c @@ -997,7 +997,7 @@ HB_SIZE hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, HB_S HB_STACK_TLS_PRELOAD do { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pValue ); hb_vmPush( pBaseArray->pItems + ulStart ); hb_vmPushLong( ++ulStart ); @@ -1161,7 +1161,7 @@ HB_SIZE hb_arrayRevScan( PHB_ITEM pArray, PHB_ITEM pValue, HB_SIZE * pulStart, H HB_STACK_TLS_PRELOAD do { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pValue ); if( ulStart < pBaseArray->ulLen ) hb_vmPush( pBaseArray->pItems + ulStart ); @@ -1322,7 +1322,7 @@ HB_BOOL hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, HB_SIZE * pulStart, HB_S { do { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( bBlock ); hb_vmPush( pBaseArray->pItems + ulStart ); hb_vmPushLong( ulStart + 1 ); diff --git a/harbour/src/vm/asort.c b/harbour/src/vm/asort.c index 6348093ad6..debf496ca2 100644 --- a/harbour/src/vm/asort.c +++ b/harbour/src/vm/asort.c @@ -67,7 +67,7 @@ static HB_BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2, PHB_ITEM pBlock, { if( pBlock ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pBlock ); hb_vmPush( pItem1 ); hb_vmPush( pItem2 ); diff --git a/harbour/src/vm/classes.c b/harbour/src/vm/classes.c index e626cd691d..3cdb5b77be 100644 --- a/harbour/src/vm/classes.c +++ b/harbour/src/vm/classes.c @@ -4333,7 +4333,7 @@ HB_FUNC_STATIC( msgEvalInline ) HB_USHORT uiPCount = hb_pcount(), uiParam; PHB_ITEM pBlock; - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( hb_arrayGetItemPtr( s_pClasses[ pMethod->uiSprClass ]->pInlines, pMethod->uiData ) ); diff --git a/harbour/src/vm/eval.c b/harbour/src/vm/eval.c index 7d79c813da..793960e0aa 100644 --- a/harbour/src/vm/eval.c +++ b/harbour/src/vm/eval.c @@ -313,7 +313,7 @@ PHB_ITEM hb_itemDoC( const char * szFunc, HB_ULONG ulPCount, ... ) /* undocumented Clipper _cEval0() */ void hb_evalBlock0( PHB_ITEM pCodeBlock ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pCodeBlock ); hb_vmSend( 0 ); } @@ -321,7 +321,7 @@ void hb_evalBlock0( PHB_ITEM pCodeBlock ) /* undocumented Clipper _cEval1() */ void hb_evalBlock1( PHB_ITEM pCodeBlock, PHB_ITEM pParam ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pCodeBlock ); hb_vmPush( pParam ); hb_vmSend( 1 ); @@ -334,7 +334,7 @@ void hb_evalBlock( PHB_ITEM pCodeBlock, ... ) HB_USHORT uiParams = 0; PHB_ITEM pParam; - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pCodeBlock ); va_start( args, pCodeBlock ); @@ -364,7 +364,7 @@ HB_FUNC( HB_FORNEXT ) /* nStart, nEnd | bEnd, bCode, nStep */ while( lStart <= lEnd ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pCodeBlock ); hb_vmPushLong( lStart ); hb_vmSend( 1 ); @@ -380,7 +380,7 @@ HB_FUNC( HB_FORNEXT ) /* nStart, nEnd | bEnd, bCode, nStep */ lEnd = hb_parnl( 2 ); while( lStart <= lEnd ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pCodeBlock ); hb_vmPushLong( lStart ); hb_vmSend( 1 ); diff --git a/harbour/src/vm/evalhb.c b/harbour/src/vm/evalhb.c index 4f27929f07..8c3d5527d4 100644 --- a/harbour/src/vm/evalhb.c +++ b/harbour/src/vm/evalhb.c @@ -66,7 +66,7 @@ HB_FUNC( EVAL ) int iPCount = hb_pcount(); int iParam; - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pItem ); /* NOTE: hb_param() function cannot be used for parameter access * because we need to pass the references too. diff --git a/harbour/src/vm/hvm.c b/harbour/src/vm/hvm.c index bcda4c6104..365ae0b9f9 100644 --- a/harbour/src/vm/hvm.c +++ b/harbour/src/vm/hvm.c @@ -6029,7 +6029,7 @@ HB_ITEM_PTR hb_vmEvalBlock( HB_ITEM_PTR pBlock ) HB_TRACE(HB_TR_DEBUG, ("hb_vmEvalBlock(%p)", pBlock)); - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pBlock ); hb_vmSend( 0 ); return hb_stackReturnItem(); @@ -6051,7 +6051,7 @@ HB_ITEM_PTR hb_vmEvalBlockV( HB_ITEM_PTR pBlock, HB_ULONG ulArgCount, ... ) HB_TRACE(HB_TR_DEBUG, ("hb_vmEvalBlockV(%p, %lu, ...)", pBlock, ulArgCount)); - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pBlock ); va_start( va, ulArgCount ); @@ -6076,9 +6076,9 @@ PHB_ITEM hb_vmEvalBlockOrMacro( PHB_ITEM pItem ) if( HB_IS_BLOCK( pItem ) ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pItem ); - hb_vmSend( 0 ); + hb_vmEval( 0 ); } else { diff --git a/harbour/src/vm/thread.c b/harbour/src/vm/thread.c index 77eda879ff..c6e3da7f1b 100644 --- a/harbour/src/vm/thread.c +++ b/harbour/src/vm/thread.c @@ -944,7 +944,7 @@ static HB_THREAD_STARTFUNC( hb_threadStartVM ) if( HB_IS_BLOCK( pStart ) ) { - hb_vmPushSymbol( &hb_symEval ); + hb_vmPushEvalSym(); hb_vmPush( pStart ); fSend = HB_TRUE; }