From a46e6aff0ff8dd82f4033cab8b8c659658a39f1a Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Mon, 9 Jan 2006 13:41:27 +0000 Subject: [PATCH] 2006-01-09 14:50 UTC+0100 Ryszard Glab * include/hbexprb.c * source/compiler/exproptb.c * source/macro/macrob.c * fixed to release the memory if macro compiled code contains a variable or a function reference * source/rtl/filesys.c * added missing '(' to copile correctly on UNIX'es --- harbour/ChangeLog | 11 +++++++++++ harbour/include/hbexprb.c | 8 ++++++++ harbour/source/compiler/exproptb.c | 2 +- harbour/source/macro/macrob.c | 2 +- harbour/source/rtl/filesys.c | 2 +- 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5f4c7ba54a..8d1fc950de 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ * fixed <-x-> match marker +2006-01-09 14:50 UTC+0100 Ryszard Glab + * include/hbexprb.c + * source/compiler/exproptb.c + * source/macro/macrob.c + * fixed to release the memory if macro compiled code contains + a variable or a function reference + + * source/rtl/filesys.c + * added missing '(' to copile correctly on UNIX'es + + 2005-12-28 13:05 UTC+0100 Antonio Linares (alinares@fivetechsoft.com) * vm/maindll.c + Added new functions HBDLLENTRY1() and HBDLLENTRY2() diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index a89579fc6a..4476cb1d7b 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -828,6 +828,10 @@ static HB_EXPR_FUNC( hb_compExprUseVarRef ) case HB_EA_STATEMENT: hb_compWarnMeaningless( pSelf ); case HB_EA_DELETE: + /* NOTE: variable name should be released if macro compilation */ +#if defined( HB_MACRO_SUPPORT ) + HB_XFREE( pSelf->value.asSymbol ); +#endif break; } return pSelf; @@ -859,6 +863,10 @@ static HB_EXPR_FUNC( hb_compExprUseFunRef ) case HB_EA_STATEMENT: hb_compWarnMeaningless( pSelf ); case HB_EA_DELETE: + /* NOTE: function name should be released if macro compilation */ +#if defined( HB_MACRO_SUPPORT ) + HB_XFREE( pSelf->value.asSymbol ); +#endif break; } return pSelf; diff --git a/harbour/source/compiler/exproptb.c b/harbour/source/compiler/exproptb.c index e0b01bad67..a40b1f080f 100644 --- a/harbour/source/compiler/exproptb.c +++ b/harbour/source/compiler/exproptb.c @@ -5,6 +5,6 @@ /* hbexprb.c is also included from ../macro/macro.c * However it produces a slighty different code if used in * macro compiler (there is an additional parameter passed to some functions) - * 1.14 - ignore this magic number - this is used to force compilation + * 1.15 - ignore this magic number - this is used to force compilation */ #include "hbexprb.c" diff --git a/harbour/source/macro/macrob.c b/harbour/source/macro/macrob.c index 2af9d8f49b..b0d405692e 100644 --- a/harbour/source/macro/macrob.c +++ b/harbour/source/macro/macrob.c @@ -5,7 +5,7 @@ /* hbexprb.c is also included from ../compiler/exproptb.c * However it produces a slighty different code if used in * macro compiler (there is an additional parameter passed to some functions) - * 1.13 - ignore this magic number - this is used to force compilation + * 1.14 - ignore this magic number - this is used to force compilation */ #define HB_MACRO_SUPPORT diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index bed71ce9ab..6714b59a76 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -844,7 +844,7 @@ BOOL HB_EXPORT hb_fsSetDevMode( FHANDLE hFileHandle, USHORT uiDevMode ) HB_SYMBOL_UNUSED( hFileHandle ); - if uiDevMode == FD_TEXT ) + if( uiDevMode == FD_TEXT ) { hb_fsSetError( ( USHORT ) FS_ERROR ); return FALSE;