2004-04-09 10:10 UTC+0100 Ryszard Glab <rglab@imid.med.pl>

* include/hbexpra.c
   * include/hbexprop.h
   * source/compiler/expropta.c
   * source/macro/macroa.c
   * source/vm/macro.c
      * fixed my previous fix to correctly release memory in
      the macro compiler
This commit is contained in:
Ryszard Glab
2004-04-09 08:05:34 +00:00
parent 9e734084d4
commit 76ea4f0b3e
6 changed files with 22 additions and 21 deletions

View File

@@ -8,6 +8,15 @@
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2004-04-09 10:10 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbexpra.c
* include/hbexprop.h
* source/compiler/expropta.c
* source/macro/macroa.c
* source/vm/macro.c
* fixed my previous fix to correctly release memory in
the macro compiler
2004-04-08 17:20 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbexpra.c
* source/compiler/expropta.c

View File

@@ -164,36 +164,29 @@ void hb_compExprClear( HB_EXPR_PTR pExpr )
#endif
}
#if defined( HB_MACRO_SUPPORT )
void hb_compExprKill( HB_EXPR_PTR pExpr, HB_MACRO_DECL )
{
HB_TRACE(HB_TR_DEBUG, ("hb_compExprKill()"));
if( pExpr->ExprType != HB_ET_NONE )
{
HB_EXPR_PCODE1( hb_compExprDelete, pExpr );
}
}
#endif
/* Delete all components and delete self
*/
#if defined( HB_MACRO_SUPPORT )
void hb_compExprDelete( HB_EXPR_PTR pExpr, HB_MACRO_DECL )
#else
void hb_compExprDelete( HB_EXPR_PTR pExpr )
#endif
{
HB_TRACE(HB_TR_DEBUG, ("hb_compExprDelete()"));
#if defined( HB_MACRO_SUPPORT )
pExpr->ExprType = HB_ET_NONE;
if( pExpr->ExprType != HB_ET_NONE )
{
HB_EXPR_USE( pExpr, HB_EA_DELETE );
pExpr->ExprType = HB_ET_NONE;
}
}
#else
void hb_compExprDelete( HB_EXPR_PTR pExpr )
{
HB_TRACE(HB_TR_DEBUG, ("hb_compExprDelete()"));
if( --pExpr->Counter == 0 )
{
HB_EXPR_USE( pExpr, HB_EA_DELETE );
HB_XFREE( pExpr );
}
#endif
}
#endif
/* Delete all components and delete self
*/

View File

@@ -389,7 +389,6 @@ BOOL hb_compExprIsValidMacro( char *, BOOL *, HB_MACRO_DECL );
#ifdef HB_MACRO_SUPPORT
void hb_compExprKill( HB_EXPR_PTR, HB_MACRO_DECL );
HB_EXPR_PTR hb_compExprNewArrayAt( HB_EXPR_PTR, HB_EXPR_PTR, HB_MACRO_DECL );
HB_EXPR_PTR hb_compExprSetOperand( HB_EXPR_PTR, HB_EXPR_PTR, HB_MACRO_DECL );
HB_EXPR_PTR hb_compExprGenPop( HB_EXPR_PTR, HB_MACRO_DECL );

View File

@@ -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.12 - ignore this magic number - this is used to force compilation
* 1.13 - ignore this magic number - this is used to force compilation
*/
#include "hbexpra.c"

View File

@@ -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.12 - ignore this magic number - this is used to force compilation
* 1.13 - ignore this magic number - this is used to force compilation
*/
#define HB_MACRO_SUPPORT

View File

@@ -155,7 +155,7 @@ static int hb_macroParse( HB_MACRO_PTR pMacro, char * szString )
HB_MEXPR_PTR pMExpr = s_macroAlloc;
do
{
hb_compExprKill( &pMExpr->Expression, pMacro );
hb_compExprDelete( &pMExpr->Expression, pMacro );
pMExpr = pMExpr->pPrev;
}
while( pMExpr );