Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Michael Schnell
On 01/04/2012 07:14 PM, Hans-Peter Diettrich wrote: Better question: what common capabilitiers are implemented differently in Object and TObject? The funny thing being that TObject is a class and not an Object :-) That makes *what* difference? I once for some reason tried to compile

Re: [fpc-devel] property cam access private symbol from class in other unit

2012-01-05 Thread Hans-Peter Diettrich
Martin schrieb: Note, that I am not accessing a private field of the parent class (like in the link). TForm1 = class(TForm) public FFoo: TFoo; property Num: Integer read FFoo.FBar; end; When FFoo is a pointer or reference, it IMO should not be possible at all, to select a

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Hans-Peter Diettrich
Marcos Douglas schrieb: I don't see any reason why the Object type should be dropped. It's close to C++ objects, useful in porting code. It allows for static objects, e.g. in the stack, while TObject is bound to the heap (without tricks). So, Object types is indicated only for compatibility?

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Hans-Peter Diettrich
Florian Klämpfl schrieb: Am 04.01.2012 19:24, schrieb Hans-Peter Diettrich: Skybuck Flying schrieb: -Original Message- From: Hans-Peter Diettrich Sent: Tuesday, January 03, 2012 14:56 To: FPC developers' list Subject: Re: [fpc-devel] Pointer cache for fast class/pointer access.

[fpc-devel] simple UTF tests

2012-01-05 Thread Michael Schnell
With Lazarus on Linux, I did some simple tests with UTF strings. I found that the length of an AnsiString(CP_UTF16) is given in terms of bytes and not of Words. Is this like it should ? I found that pchar(s8) with an UTF-8 string works as expected, giving a pointer to the UTF-8 encoded byte

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Marco van de Voort
In our previous episode, Michael Schnell said: With Lazarus on Linux, I did some simple tests with UTF strings. I found that the length of an AnsiString(CP_UTF16) is given in terms of bytes and not of Words. Is this like it should ? Yes. Afaik that is not a sane combination, but Delphi

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Marco van de Voort
In our previous episode, Michael Schnell said: Better question: what common capabilitiers are implemented differently in Object and TObject? The funny thing being that TObject is a class and not an Object :-) Which tobject do you mean? Objpas.tobject (Delphi) or objects.tobject (TP) ? :-)

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Marco van de Voort
In our previous episode, Sven Barth said: Object instead Class? They are basically similar to records with methods (which we now have as well...) if you use them directly (this means: not as pointer types): they are located on the stack and nested objects are part of the memory

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Sergei Gorelkin
05.01.2012 15:45, Marco van de Voort пишет: In our previous episode, Sven Barth said: Object instead Class? They are basically similar to records with methods (which we now have as well...) if you use them directly (this means: not as pointer types): they are located on the stack and nested

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Marco van de Voort
In our previous episode, Sergei Gorelkin said: Afaik stack based TP Objects are not initialized and thus not safe for automated types. (I looked into upgrading TV with ansistring a few years back) This is no longer correct, stack based objects are initialized and finalized if necessary.

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Marco van de Voort
In our previous episode, Sergei Gorelkin said: This is no longer correct, stack based objects are initialized and finalized if necessary. There was indeed an issue with inheritance (if both ancestor and descendant contain managed members, then members of ancestor were not handled), but I

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Sergei Gorelkin
05.01.2012 16:12, Marco van de Voort пишет: In our previous episode, Sergei Gorelkin said: This is no longer correct, stack based objects are initialized and finalized if necessary. There was indeed an issue with inheritance (if both ancestor and descendant contain managed members, then

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Michael Schnell
On 01/05/2012 12:32 PM, Marco van de Voort wrote: When converted to something else, the default system encoding for the corresponding default string is probably used. To force 8 or 16 bits one should use pansichar or pwidechar. This is Delphi compatible. Hmm. ( Would it not be more sane to

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Michael Schnell
On 01/05/2012 12:44 PM, Marco van de Voort wrote: Which tobject do you mean? Objpas.tobject (Delphi) or objects.tobject (TP) ? :-) even more funny... -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Marco van de Voort
In our previous episode, Michael Schnell said: ( Would it not be more sane to always use the default system encoding (i.e. UTF-8 in Linux) for pchar That depends on how the default string type is defined. Discussions about that is postponed. and auto-convert the string content ? ) pchars

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Sven Barth
Am 05.01.2012 11:22, schrieb Michael Schnell: On 01/04/2012 07:14 PM, Hans-Peter Diettrich wrote: Better question: what common capabilitiers are implemented differently in Object and TObject? The funny thing being that TObject is a class and not an Object :-) That makes *what* difference?

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Sven Barth
Am 05.01.2012 12:32, schrieb Marco van de Voort: In our previous episode, Michael Schnell said: With Lazarus on Linux, I did some simple tests with UTF strings. I found that the length of an AnsiString(CP_UTF16) is given in terms of bytes and not of Words. Is this like it should ? Yes. Afaik

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Sven Barth
Am 05.01.2012 14:30, schrieb Sven Barth: Am 05.01.2012 12:32, schrieb Marco van de Voort: In our previous episode, Michael Schnell said: With Lazarus on Linux, I did some simple tests with UTF strings. I found that the length of an AnsiString(CP_UTF16) is given in terms of bytes and not of

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Michael Schnell
On 01/05/2012 02:19 PM, Marco van de Voort wrote: First define a solution for what and why. I don't suppose this makes sense, as the Delphi behavior needs to be mimicked. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

[fpc-devel] Re: [Lazarus] Free Pascal 2.6.0 released!

2012-01-05 Thread Sven Barth
Am 01.01.2012 16:43, schrieb Marco van de Voort: Changes that may break backwards compatibility are documented at: http://wiki.freepascal.org/User_Changes_2.6.0 I have found something that might be noteworthy as well: If you use sqldb with SQLite then ftDateTime values are now saved

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Marco van de Voort
In our previous episode, Michael Schnell said: I don't suppose this makes sense, as the Delphi behavior needs to be mimicked. It doesn't make sense if your ultimate object is to get FPC changed or amended. It does make sense if you want your problem analysed and want alternate suggestions.

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Michael Schnell
I am just watching the proceeding of FPC and doing some test when I have some spare time to do this. Of course I would like to help making FPC better and - if possible - more sane than Delphi. But I do see the limits. -Michael ___ fpc-devel

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Hans-Peter Diettrich
Marco van de Voort schrieb: In our previous episode, Michael Schnell said: With Lazarus on Linux, I did some simple tests with UTF strings. I found that the length of an AnsiString(CP_UTF16) is given in terms of bytes and not of Words. Is this like it should ? Yes. Afaik that is not a sane

Re: [fpc-devel] simple UTF tests

2012-01-05 Thread Marco van de Voort
In our previous episode, Hans-Peter Diettrich said: With Lazarus on Linux, I did some simple tests with UTF strings. I found that the length of an AnsiString(CP_UTF16) is given in terms of bytes and not of Words. Is this like it should ? Yes. Afaik that is not a sane combination, but

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Marcos Douglas
On Thu, Jan 5, 2012 at 8:03 AM, Hans-Peter Diettrich drdiettri...@aol.com wrote: Marcos Douglas schrieb: I don't see any reason why the Object type should be dropped. It's close to C++ objects, useful in porting code. It allows for static objects, e.g. in the stack, while TObject is bound to