Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Jonas Maebe
On 30 Apr 2010, at 05:42, Bihar Anwar wrote: By the way, how do I call internal compiler functions directly (maybe using a tricky way) such as system.fpc_ansistr_incr_ref() and system.fpc_ansistr_decr_ref? I couldn't call those kind of functions from my program, I guest it is caused by

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread dmitry boyarintsev
On Fri, Apr 30, 2010 at 7:42 AM, Bihar Anwar bihar_an...@rocketmail.com wrote: I hope FPC developers will include StringRefCount() to the RTL. Why would you need that? thanks, Dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Bihar Anwar
Thanks Jonas for your advice. - Original Message From: Jonas Maebe jonas.ma...@elis.ugent.be To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org Sent: Fri, April 30, 2010 2:37:23 PM Subject: Re: [fpc-pascal] Is there a StringRefCount() equivalence? On 30 Apr 2010, at 05

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Bihar Anwar
boyarintsev skalogryz.li...@gmail.com To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org Sent: Fri, April 30, 2010 3:22:22 PM Subject: Re: [fpc-pascal] Is there a StringRefCount() equivalence? On Fri, Apr 30, 2010 at 7:42 AM, Bihar Anwar bihar_an...@rocketmail.com wrote: I hope FPC

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread dmitry boyarintsev
On Fri, Apr 30, 2010 at 1:18 PM, Bihar Anwar bihar_an...@rocketmail.com wrote: Because there are few certain condition when we need to observe what happened to ansistring/unicodestring variable. In my case now, I need it to learn how reference counting works. For example, using Move() on

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Martin
On 30/04/2010 09:22, dmitry boyarintsev wrote: On Fri, Apr 30, 2010 at 7:42 AM, Bihar Anwarbihar_an...@rocketmail.com wrote: I hope FPC developers will include StringRefCount() to the RTL. Why would you need that? There are use cases for this. A while ago I thinking about a

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Juha Manninen
Hi, There are use cases for this. A while ago I thinking about a string-hash table as a cache for strings. I have done that. Then I needed to inspect the reference count for debugging and configuration purposes. I didn't know there is StringRefCount() function so I also counted the string

[fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-29 Thread Bihar Anwar
Delphi has StringRefCount() function (I'm not aware since what version it was introduced). I just curious, is there a function equivalent to it in FPC? Currently, I just steal a portion of code from System unit: type PAnsiRec = ^TAnsiRec; TAnsiRec = packed record Ref, Len :

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-29 Thread Anton Tichawa
On Thu, 2010-04-29 at 10:30 -0700, Bihar Anwar wrote: Delphi has StringRefCount() function (I'm not aware since what version it was introduced). I just curious, is there a function equivalent to it in FPC? Currently, I just steal a portion of code from System unit: type PAnsiRec =

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-29 Thread Bihar Anwar
those kind of functions from my program, I guest it is caused by compilerproc definition. - Original Message From: Anton Tichawa anton.tich...@chello.at To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org Sent: Fri, April 30, 2010 12:44:08 AM Subject: Re: [fpc-pascal