From 9fc3562477655697145c1a942ca2f95198aab856 Mon Sep 17 00:00:00 2001 From: Miguel Angel Marchuet Frutos Date: Tue, 15 Jan 2008 11:33:42 +0000 Subject: [PATCH] =?UTF-8?q?2008-01-14=2012:28=20UTC+0100=20Miguel=20Angel?= =?UTF-8?q?=20Marchuet=20Frutos=20=20=20=20*=20s?= =?UTF-8?q?ource/vm/extend.c=20=20=20=20=20*=20Added=20conversion=20from?= =?UTF-8?q?=20logical=20params=20in=20hb=5Fpar*=20functions.=20=20=20=20?= =?UTF-8?q?=20=20=20(=20thks=20to=20Juan=20G=C3=A1lvez=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- harbour/ChangeLog | 5 +++++ harbour/source/vm/extend.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d34a114576..f11c492ceb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2008-01-14 12:28 UTC+0100 Miguel Angel Marchuet Frutos + * source/vm/extend.c + * Added conversion from logical params in hb_par* functions. + ( thks to Juan Gálvez ) + 2008-01-15 10:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbdefs.h ! do not define [U]LONGLONG when HB_DONT_DEFINE_BASIC_TYPES macro diff --git a/harbour/source/vm/extend.c b/harbour/source/vm/extend.c index f0b472ecd5..c8770783aa 100644 --- a/harbour/source/vm/extend.c +++ b/harbour/source/vm/extend.c @@ -434,6 +434,8 @@ HB_EXPORT double hb_parnd( int iParam, ... ) return ( double ) pItem->item.asInteger.value; else if( HB_IS_LONG( pItem ) ) return ( double ) pItem->item.asLong.value; + else if( HB_IS_LOGICAL( pItem ) ) + return ( double ) pItem->item.asLogical.value; else if( HB_IS_ARRAY( pItem ) ) { va_list va; @@ -467,6 +469,8 @@ HB_EXPORT int hb_parni( int iParam, ... ) return ( int ) pItem->item.asLong.value; else if( HB_IS_DOUBLE( pItem ) ) return ( int ) pItem->item.asDouble.value; + else if( HB_IS_LOGICAL( pItem ) ) + return ( int ) pItem->item.asLogical.value; else if( HB_IS_ARRAY( pItem ) ) { va_list va; @@ -506,6 +510,8 @@ HB_EXPORT long hb_parnl( int iParam, ... ) #endif else if( HB_IS_DATE( pItem ) ) return ( long ) pItem->item.asDate.value; + else if( HB_IS_LOGICAL( pItem ) ) + return ( long ) pItem->item.asLogical.value; else if( HB_IS_ARRAY( pItem ) ) { va_list va; @@ -546,6 +552,8 @@ HB_EXPORT LONGLONG hb_parnll( int iParam, ... ) #endif else if( HB_IS_DATE( pItem ) ) return ( LONGLONG ) pItem->item.asDate.value; + else if( HB_IS_LOGICAL( pItem ) ) + return ( LONGLONG ) pItem->item.asLogical.value; else if( HB_IS_ARRAY( pItem ) ) { va_list va; @@ -586,6 +594,8 @@ HB_EXPORT HB_LONG hb_parnint( int iParam, ... ) #endif else if( HB_IS_DATE( pItem ) ) return ( HB_LONG ) pItem->item.asDate.value; + else if( HB_IS_LOGICAL( pItem ) ) + return ( HB_LONG ) pItem->item.asLogical.value; else if( HB_IS_ARRAY( pItem ) ) { va_list va;