diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 220ecc00b3..f041b3d0b4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2012-03-21 12:14 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/src/vm/thread.c + + added support for optional parameters to hb_mutexEval() function: + hb_mutexEval( , | <@sFunc()> [, ] ) + -> + 2012-03-20 19:32 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/src/codepage/cp_big5.c ! minor typo in information message diff --git a/harbour/src/vm/thread.c b/harbour/src/vm/thread.c index 5eb22959f3..795e19ec53 100644 --- a/harbour/src/vm/thread.c +++ b/harbour/src/vm/thread.c @@ -71,7 +71,7 @@ hb_mutexNotifyAll( [, ] ) -> NIL hb_mutexSubscribe( , [ ] [, @ ] ) -> hb_mutexSubscribeNow( , [ ] [, @ ] ) -> - hb_mutexEval( , | <@sFunc()> ) -> + hb_mutexEval( , | <@sFunc()> [, ] ) -> ** hb_mutexQueueInfo( , [ @ ], [ @ ] ) -> .T. hb_mtVM() -> @@ -2600,11 +2600,15 @@ HB_FUNC( HB_MUTEXEVAL ) if( pEval ) { + int iPCount = hb_pcount(), iParam; + if( hb_threadMutexLock( pItem ) ) { hb_vmPushEvalSym(); hb_vmPush( pEval ); - hb_vmSend( 0 ); + for( iParam = 3; iParam <= iPCount; iParam++ ) + hb_vmPush( hb_stackItemFromBase( iParam ) ); + hb_vmSend( ( HB_USHORT ) ( iPCount - 2 ) ); hb_threadMutexUnlock( pItem ); } }