[fpc-pascal] Re: TFPSMap return wrong pointer address

2013-01-31 Thread ik
On Thu, Jan 31, 2013 at 9:44 PM, ik wrote: > On Thu, Jan 31, 2013 at 9:35 PM, ik wrote: >> Hello, >> >> I'm trying to use TFPSMap, to store a class using a key. >> >> While the key seems to be saved properly, and easy to find, the data >> pointer that returns is wrong. >> The adding of the data c

Re: [fpc-pascal] pointer address safety

2013-01-31 Thread ik
On Thu, Jan 31, 2013 at 10:25 PM, Sven Barth wrote: > On 31.01.2013 19:55, ik wrote: >> >> Hello, >> >> What is the safest (no memory corruption etc...) way to use format >> string, and by using '%P' pass a class memory address ? >> >> Does casting to Pointer good, or is it unsafe ? > > > As Forma

Re: [fpc-pascal] pointer address safety

2013-01-31 Thread Sven Barth
On 31.01.2013 19:55, ik wrote: Hello, What is the safest (no memory corruption etc...) way to use format string, and by using '%P' pass a class memory address ? Does casting to Pointer good, or is it unsafe ? As Format does not support objects being provided to it you MUST even cast to Point

[fpc-pascal] Re: TFPSMap return wrong pointer address

2013-01-31 Thread ik
On Thu, Jan 31, 2013 at 9:35 PM, ik wrote: > Hello, > > I'm trying to use TFPSMap, to store a class using a key. > > While the key seems to be saved properly, and easy to find, the data > pointer that returns is wrong. > The adding of the data can be found here: > https://github.com/ik5/split_laza

[fpc-pascal] TFPSMap return wrong pointer address

2013-01-31 Thread ik
Hello, I'm trying to use TFPSMap, to store a class using a key. While the key seems to be saved properly, and easy to find, the data pointer that returns is wrong. The adding of the data can be found here: https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L244 Here is

[fpc-pascal] pointer address safety

2013-01-31 Thread ik
Hello, What is the safest (no memory corruption etc...) way to use format string, and by using '%P' pass a class memory address ? Does casting to Pointer good, or is it unsafe ? Thanks, Ido ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org ht