Brian,
Please advise if fixed after: 2009-07-10 10:49 UTC-0430 Ron Pinkas
<ron.pinkas/at/xharbour.com>
Ron
From: bhays
Sent: Monday, July 06, 2009 1:55 AM
To: 'xharbour developer list'
Subject: [xHarbour-developers] hb_uncompress in hbcomprs.c returns anunstable
string
Ron and friends:
This function returns an xgrabbed memory block in this way, and does not
release it:
hb_retclenAdoptRaw( cDest, ulDstlen );
Notice the "RAW".
Can you please tell me if this is currently accepted code, or does it return an
unstable pointer to something that might get released or mangled?
The attached isolated test shows that if I try to macro compile a string that
was returned to a variable from hb_uncompress, the &() line throws an error.
Here are the 2 lines of code in question:
cOrgStr := hb_UnCompress( nOrgLen, cCompressed )
? &( cOrgStr )
If I hack an EXACT COPY of the string with this:
cCopy := alltrim( cOrgStr + " " )
the cCopy WILL compile, even though it traces out as the exact same string.
There's some internal property of the uncompressed string that causes an
instability with the & operator.
Thanks!
--
Brian Hays
--------------------------------------------------------------------------------
------------------------------------------------------------------------------
--------------------------------------------------------------------------------
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers