Ron:

 

Yes, thank you, the string returned from hb_uncompress can be macro compiled
now.

 

May I ask:

1.       What was the difference in the ITEM; why could it be written to a
log and 
appear perfect, yet it wouldn't compile?

2.       What are the rules for when to use

hb_retclenAdoptRaw

 vs.

hb_retclenAdopt

                ??

 

Thanks!

 

--

Brian Hays

Abacus Data Systems, Inc.

 

From: Ron Pinkas [mailto:ron.pin...@xharbour.com] 
Sent: Friday, July 10, 2009 8:22 AM
To: bhays; 'xharbour developer list'
Subject: Re: [xHarbour-developers] hb_uncompress in hbcomprs.c returns
anunstable string

 

Brian,

 

Please advise if fixed after: 2009-07-10 10:49 UTC-0430 Ron Pinkas
<ron.pinkas/at/xharbour.com>


Ron

 

From: bhays <mailto:bh...@abacuslaw.com>  

Sent: Monday, July 06, 2009 1:55 AM

To: 'xharbour developer list'
<mailto:xharbour-developers@lists.sourceforge.net>  

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

Checked by AVG - www.avg.com
Version: 8.5.375 / Virus Database: 270.12.94/2208 - Release Date: 07/10/09
07:05:00

------------------------------------------------------------------------------
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

Reply via email to