diff --git a/ChangeLog.txt b/ChangeLog.txt index 64373c3701..6b68f0a95e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,19 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2017-04-20 09:14 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * include/hbcomp.h + * src/compiler/hbmain.c + * removed not longer necessary calls to hb_compExprLstDealloc() + + * src/compiler/hbcomp.c + ! do not generate internal error when nested expression deallocation + is activated + + * contrib/rddads/ads1.c + ! fixed bad typo which effectively completely broke + AdsTestRecLocks( .t. ) mode + 2017-04-19 18:20 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/common/hbdate.c ! fixed compilation with HB_TR_LEVEL_DEBUG in C mode diff --git a/contrib/rddads/ads1.c b/contrib/rddads/ads1.c index 136c2c508f..01fdf1b6d3 100644 --- a/contrib/rddads/ads1.c +++ b/contrib/rddads/ads1.c @@ -1999,7 +1999,7 @@ static HB_ERRCODE adsDeleteRec( ADSAREAP pArea ) if( hb_ads_bTestRecLocks ) { - if( ! hb_adsCheckLock( pArea ) == HB_SUCCESS ) + if( hb_adsCheckLock( pArea ) != HB_SUCCESS ) return HB_FAILURE; } @@ -2572,7 +2572,7 @@ static HB_ERRCODE adsPutRec( ADSAREAP pArea, const HB_BYTE * pBuffer ) if( hb_ads_bTestRecLocks ) { - if( ! hb_adsCheckLock( pArea ) == HB_SUCCESS ) + if( hb_adsCheckLock( pArea ) != HB_SUCCESS ) return HB_FAILURE; } @@ -2622,7 +2622,7 @@ static HB_ERRCODE adsPutValue( ADSAREAP pArea, HB_USHORT uiIndex, PHB_ITEM pItem if( hb_ads_bTestRecLocks ) { - if( ! hb_adsCheckLock( pArea ) == HB_SUCCESS ) + if( hb_adsCheckLock( pArea ) != HB_SUCCESS ) return HB_FAILURE; } @@ -2840,7 +2840,7 @@ static HB_ERRCODE adsRecall( ADSAREAP pArea ) if( hb_ads_bTestRecLocks ) { - if( ! hb_adsCheckLock( pArea ) == HB_SUCCESS ) + if( hb_adsCheckLock( pArea ) != HB_SUCCESS ) return HB_FAILURE; } @@ -5056,7 +5056,7 @@ static HB_ERRCODE adsPutValueFile( ADSAREAP pArea, HB_USHORT uiIndex, const char if( hb_ads_bTestRecLocks ) { - if( ! hb_adsCheckLock( pArea ) == HB_SUCCESS ) + if( hb_adsCheckLock( pArea ) != HB_SUCCESS ) return HB_FAILURE; } diff --git a/include/hbcomp.h b/include/hbcomp.h index d0968bc759..a51e253612 100644 --- a/include/hbcomp.h +++ b/include/hbcomp.h @@ -251,8 +251,6 @@ extern int hb_compMainExt( int argc, const char * const argv[], HB_BYTE ** pBuf extern void hb_compOutStd( HB_COMP_DECL, const char * szMessage ); extern void hb_compOutErr( HB_COMP_DECL, const char * szMessage ); -extern void hb_compExprLstDealloc( HB_COMP_DECL ); - extern PHB_EXPR hb_compExprGenStatement( PHB_EXPR, HB_COMP_DECL ); extern PHB_EXPR hb_compExprGenPush( PHB_EXPR, HB_COMP_DECL ); extern PHB_EXPR hb_compExprGenPop( PHB_EXPR, HB_COMP_DECL ); diff --git a/src/compiler/hbcomp.c b/src/compiler/hbcomp.c index aff8cbef8b..5dffd69dde 100644 --- a/src/compiler/hbcomp.c +++ b/src/compiler/hbcomp.c @@ -82,8 +82,6 @@ static void hb_compExprDealloc( HB_COMP_DECL, PHB_EXPR pExpr ) } hb_xfree( pExpItm ); } - else - hb_errInternal( HB_EI_ERRUNRECOV, "hb_compExprDealloc() called with an invalid pointer", NULL, NULL ); } static PHB_EXPR hb_compExprNew( HB_COMP_DECL, HB_EXPRTYPE iType ) @@ -117,7 +115,7 @@ static void hb_compExprFree( HB_COMP_DECL, PHB_EXPR pExpr ) hb_compExprDealloc( HB_COMP_PARAM, pExpr ); } -void hb_compExprLstDealloc( HB_COMP_DECL ) +static void hb_compExprLstDealloc( HB_COMP_DECL ) { if( HB_COMP_PARAM->pExprLst ) { diff --git a/src/compiler/hbmain.c b/src/compiler/hbmain.c index 62c4a9148a..fd80489259 100644 --- a/src/compiler/hbmain.c +++ b/src/compiler/hbmain.c @@ -3801,9 +3801,6 @@ void hb_compCodeBlockRewind( HB_COMP_DECL ) /* initialize support variables */ static void hb_compInitVars( HB_COMP_DECL ) { - if( HB_COMP_PARAM->iErrorCount != 0 ) - hb_compExprLstDealloc( HB_COMP_PARAM ); - HB_COMP_PARAM->functions.iCount = 0; HB_COMP_PARAM->functions.pFirst = NULL; HB_COMP_PARAM->functions.pLast = NULL;