2016-01-28 15:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* include/hbexprb.c
  * src/common/expropt1.c
    ! fixed typo in macro alias push/pop operation
    * disable multivalue macro expansion for macro expressions enclosed in
      parenthesis, i.e.:
            s := "1,2,3"
            QOut( &s )        // 1, 2, 3
            QOut( &(s) )      // 1, 2, 3
            QOut( (&s) )      // 3

  * include/hbexprop.h
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/vm/hvm.c
    * return last array item when hb_ArrayToParams() is used in
      parenthesis, i.e.:
         QOut( hb_ArrayToParams( { 1, 2, 3 } ) )      // 1, 2, 3
         QOut( ( hb_ArrayToParams( { 1, 2, 3 } ) ) )  // 3
This commit is contained in:
Przemysław Czerpak
2016-01-28 15:00:20 +01:00
parent 301e4553a9
commit 08c4bf45fc
6 changed files with 50 additions and 16 deletions

View File

@@ -1039,9 +1039,6 @@ static HB_EXPR_FUNC( hb_compExprUseList )
case HB_EA_REDUCE:
pSelf = hb_compExprReduceList( pSelf, HB_COMP_PARAM );
if( HB_SUPPORT_HARBOUR )
pSelf = hb_compExprListStrip( pSelf, HB_COMP_PARAM );
if( HB_SUPPORT_XBASE && pSelf->ExprType == HB_ET_LIST )
{
if( hb_compExprListLen( pSelf ) == 1 )
@@ -1056,6 +1053,9 @@ static HB_EXPR_FUNC( hb_compExprUseList )
}
}
}
if( HB_SUPPORT_HARBOUR )
pSelf = hb_compExprListStrip( pSelf, HB_COMP_PARAM );
break;
case HB_EA_ARRAY_AT:
@@ -1406,9 +1406,10 @@ static HB_EXPR_FUNC( hb_compExprUseArrayAt )
{
if( HB_SUPPORT_XBASE )
{
if( pSelf->value.asMacro.SubType != HB_ET_MACRO_SYMBOL &&
pSelf->value.asMacro.SubType != HB_ET_MACRO_REFER &&
pSelf->value.asMacro.SubType != HB_ET_MACRO_ALIASED )
if( pSelf->value.asList.pIndex->value.asMacro.SubType != HB_ET_MACRO_SYMBOL &&
pSelf->value.asList.pIndex->value.asMacro.SubType != HB_ET_MACRO_REFER &&
pSelf->value.asList.pIndex->value.asMacro.SubType != HB_ET_MACRO_ALIASED &&
( pSelf->value.asList.pIndex->value.asMacro.SubType & HB_ET_MACRO_PARE ) == 0 )
{
pSelf->value.asList.pIndex->value.asMacro.SubType |= HB_ET_MACRO_LIST;
fMacroIndex = HB_TRUE;
@@ -1486,9 +1487,10 @@ static HB_EXPR_FUNC( hb_compExprUseArrayAt )
{
if( HB_SUPPORT_XBASE )
{
if( pSelf->value.asMacro.SubType != HB_ET_MACRO_SYMBOL &&
pSelf->value.asMacro.SubType != HB_ET_MACRO_REFER &&
pSelf->value.asMacro.SubType != HB_ET_MACRO_ALIASED )
if( pSelf->value.asList.pIndex->value.asMacro.SubType != HB_ET_MACRO_SYMBOL &&
pSelf->value.asList.pIndex->value.asMacro.SubType != HB_ET_MACRO_REFER &&
pSelf->value.asList.pIndex->value.asMacro.SubType != HB_ET_MACRO_ALIASED &&
( pSelf->value.asList.pIndex->value.asMacro.SubType & HB_ET_MACRO_PARE ) == 0 )
{
pSelf->value.asList.pIndex->value.asMacro.SubType |= HB_ET_MACRO_LIST;
fMacroIndex = HB_TRUE;