From 4577f36e4b962813e960a6b50fb9ee70696444c5 Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Wed, 13 Dec 2000 01:33:35 +0000 Subject: [PATCH] 2000-12-12 17:35 UTC+0800 Ron Pinkas * source/vm/eval.c + Corrected support for block passed by reference. /* Ryszard, is there any reason to use hb_stackItemFromBase(1) instead of pItem? */ --- harbour/ChangeLog | 6 ++++++ harbour/source/vm/eval.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bd71ac7286..d50b5512d3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +2000-12-12 17:35 UTC+0800 Ron Pinkas + * source/vm/eval.c + + Corrected support for block passed by reference. + + /* Ryszard, is there any reason to use hb_stackItemFromBase(1) instead of pItem? */ + 2000-12-12 17:10 UTC+0800 Ron Pinkas * makefile.bc * hb_slex.bc diff --git a/harbour/source/vm/eval.c b/harbour/source/vm/eval.c index 8c44f55590..0e947f696f 100644 --- a/harbour/source/vm/eval.c +++ b/harbour/source/vm/eval.c @@ -47,9 +47,15 @@ HB_FUNC( EVAL ) { USHORT uiPCount = hb_pcount(); USHORT uiParam; + PHB_ITEM pBlock = hb_stackItemFromBase( 1 ); + + if( HB_IS_BYREF( pBlock ) ) + { + pBlock = hb_itemUnRef( pBlock ); + } hb_vmPushSymbol( &hb_symEval ); - hb_vmPush( hb_stackItemFromBase( 1 ) ); + hb_vmPush( pBlock ); /* NOTE: hb_param() function cannot be used for parameter access * because we need to pass the references too. * hb_param() is dereferencing the passed parameters