From ee6e12c6a38ca270c18db44d64750950eb628323 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Wed, 13 Nov 2002 11:24:23 +0000 Subject: [PATCH] strings as bytes arrays support (assignment) --- harbour/include/hbexprb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index 6c978d2d03..4ed04e99fa 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -1021,6 +1021,11 @@ static HB_EXPR_FUNC( hb_compExprUseArrayAt ) case HB_EA_POP_PCODE: { + /* to manage strings as bytes arrays, they must be pushed by reference */ + /* arrays also are passed by reference */ + if( pSelf->value.asList.pExprList->ExprType == HB_ET_VARIABLE ) + pSelf->value.asList.pExprList->ExprType = HB_ET_VARREF; + HB_EXPR_USE( pSelf->value.asList.pExprList, HB_EA_PUSH_PCODE ); HB_EXPR_USE( pSelf->value.asList.pIndex, HB_EA_PUSH_PCODE ); HB_EXPR_GENPCODE1( hb_compGenPCode1, HB_P_ARRAYPOP );