From 3ed4a2909af684b447c1c16f80e095b79c1f0c3e Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sat, 28 Nov 2009 03:02:59 +0000 Subject: [PATCH] 2009-11-28 04:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/fm.c * minor formatting * harbour/contrib/hbwin/olecore.c + added support for VT_ERROR variants --- harbour/ChangeLog | 7 +++++++ harbour/contrib/hbwin/olecore.c | 12 ++++++++++++ harbour/src/vm/fm.c | 9 +++++---- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e9583ab8b9..d5d7bd1e02 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,13 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-28 04:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/fm.c + * minor formatting + + * harbour/contrib/hbwin/olecore.c + + added support for VT_ERROR variants + 2009-11-27 16:58 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/hbide.prg ! Fixed a bad behaviour. HBIDE was unable to start-up. diff --git a/harbour/contrib/hbwin/olecore.c b/harbour/contrib/hbwin/olecore.c index d25c8808fa..e1e820b650 100644 --- a/harbour/contrib/hbwin/olecore.c +++ b/harbour/contrib/hbwin/olecore.c @@ -716,6 +716,14 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant ) hb_itemPutNInt( pItem, *pVariant->n1.n2.n3.puintVal ); break; + case VT_ERROR: + hb_itemPutNInt( pItem, pVariant->n1.n2.n3.scode ); + break; + + case VT_ERROR | VT_BYREF: + hb_itemPutNInt( pItem, *pVariant->n1.n2.n3.pscode ); + break; + case VT_R4: hb_itemPutND( pItem, ( double ) pVariant->n1.n2.n3.fltVal ); break; @@ -890,6 +898,10 @@ void hb_oleVariantUpdate( VARIANT* pVariant, PHB_ITEM pItem ) *pVariant->n1.n2.n3.puintVal = ( unsigned int ) hb_itemGetNI( pItem ); break; + case VT_ERROR | VT_BYREF: + *pVariant->n1.n2.n3.pscode = ( SCODE ) hb_itemGetNL( pItem ); + break; + case VT_R4 | VT_BYREF: *pVariant->n1.n2.n3.pfltVal = ( float ) hb_itemGetND( pItem ); break; diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index e05278bd04..177221c81e 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -119,7 +119,8 @@ # undef HB_FM_WIN_ALLOC #elif !defined( HB_FM_DL_ALLOC ) && !defined( HB_FM_WIN_ALLOC ) # if defined( _MSC_VER ) || defined( __BORLANDC__ ) || defined( __MINGW32__ ) || \ - ( defined( __WATCOMC__ ) && defined( HB_OS_WIN ) ) || defined( HB_OS_OS2 ) || \ + ( defined( __WATCOMC__ ) && defined( HB_OS_WIN ) ) || \ + defined( HB_OS_OS2 ) || \ ( defined( HB_FM_DLMT_ALLOC ) && defined( HB_MT_VM ) ) # define HB_FM_DL_ALLOC # else @@ -225,9 +226,9 @@ # endif #endif -#if defined( HB_MT_VM ) && ( defined( HB_FM_STATISTICS ) || \ - defined( HB_FM_DLMT_ALLOC ) || \ - !defined( HB_ATOM_INC ) || !defined( HB_ATOM_DEC ) ) +#if defined( HB_MT_VM ) && \ + ( defined( HB_FM_STATISTICS ) || \ defined( HB_FM_DLMT_ALLOC ) || \ + !defined( HB_ATOM_INC ) || !defined( HB_ATOM_DEC ) ) static HB_CRITICAL_NEW( s_fmMtx ); # define HB_FM_LOCK hb_threadEnterCriticalSection( &s_fmMtx );