diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2ac2a9d48a..0d31153464 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2004-05-06 15:40 UTC+0100 Ryszard Glab + * include/hbexpra.c + * source/common/expropt2.c + * source/compiler/expropta.c + * source/macro/macroa.c + ! Fixed optimalization of AT,ASC,LEN,CHR functions + in the macro compiler (this fixes GPF reported + by Alexander) + 2004-05-05 08:08 UTC+0200 Ilias Lazaridis * source/codepage/cdpesdos.c ! Whitespace reformatting diff --git a/harbour/include/hbexpra.c b/harbour/include/hbexpra.c index d3cab38df5..718373eb7e 100644 --- a/harbour/include/hbexpra.c +++ b/harbour/include/hbexpra.c @@ -157,7 +157,7 @@ HB_EXPR_PTR hb_compExprNew( int iType ) void hb_compExprClear( HB_EXPR_PTR pExpr ) { #if defined( HB_MACRO_SUPPORT ) - HB_SYMBOL_UNUSED( pExpr ); + pExpr->ExprType = HB_ET_NONE; #else if( --pExpr->Counter == 0 ) HB_XFREE( pExpr ); diff --git a/harbour/source/common/expropt2.c b/harbour/source/common/expropt2.c index b001b18a55..47c7db671b 100644 --- a/harbour/source/common/expropt2.c +++ b/harbour/source/common/expropt2.c @@ -1156,7 +1156,7 @@ BOOL hb_compExprReduceAT( HB_EXPR_PTR pSelf, HB_MACRO_DECL ) hb_compExprFree( pSelf->value.asFunCall.pParms, HB_MACRO_PARAM ); memcpy( pSelf, pReduced, sizeof( HB_EXPR ) ); - hb_xfree( pReduced ); + hb_compExprClear( pReduced ); return TRUE; } else @@ -1212,7 +1212,7 @@ BOOL hb_compExprReduceCHR( HB_EXPR_PTR pSelf, HB_MACRO_DECL ) hb_compExprFree( pParms, HB_MACRO_PARAM ); hb_compExprFree( pSelf->value.asFunCall.pFunName, HB_MACRO_PARAM ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); - hb_xfree( pExpr ); + hb_compExprClear( pExpr ); return TRUE; } @@ -1231,7 +1231,7 @@ BOOL hb_compExprReduceLEN( HB_EXPR_PTR pSelf, HB_MACRO_DECL ) hb_compExprFree( pParms, HB_MACRO_PARAM ); hb_compExprFree( pSelf->value.asFunCall.pFunName, HB_MACRO_PARAM ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); - hb_xfree( pExpr ); + hb_compExprClear( pExpr ); return TRUE; } return FALSE; @@ -1249,7 +1249,7 @@ BOOL hb_compExprReduceASC( HB_EXPR_PTR pSelf, HB_MACRO_DECL ) hb_compExprFree( pParms, HB_MACRO_PARAM ); hb_compExprFree( pSelf->value.asFunCall.pFunName, HB_MACRO_PARAM ); memcpy( pSelf, pExpr, sizeof( HB_EXPR ) ); - hb_xfree( pExpr ); + hb_compExprClear( pExpr ); return TRUE; } return FALSE; diff --git a/harbour/source/compiler/expropta.c b/harbour/source/compiler/expropta.c index 6e844c70bb..1d65de0d10 100644 --- a/harbour/source/compiler/expropta.c +++ b/harbour/source/compiler/expropta.c @@ -5,6 +5,6 @@ /* hbexpra.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.13 - ignore this magic number - this is used to force compilation + * 1.14 - ignore this magic number - this is used to force compilation */ #include "hbexpra.c" diff --git a/harbour/source/macro/macroa.c b/harbour/source/macro/macroa.c index 9a04034279..b4838a6cbf 100644 --- a/harbour/source/macro/macroa.c +++ b/harbour/source/macro/macroa.c @@ -5,7 +5,7 @@ /* hbexpra.c is also included from ../compiler/expropta.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