Re: [fpc-pascal] Testing applications with FPCUnit

2011-12-18 Thread Graeme Geldenhuys
On 17 December 2011 18:33, Michael Van Canneyt wrote: > > The necessary functionality is contained in the consoletestrunner unit. I have long ago said this must move to the FPC repository, not live in the Lazarus repository. -- Regards,   - Graeme - _

Re: [fpc-pascal] News from MSEide+MSEgui

2011-12-18 Thread Martin Schreiber
On 12/19/2011 01:14 AM, David Emerson wrote: > Congratulations, Martin! Keep up the good work. > Thanks. :-) > (is that your own custom-built git gui?) > MSEgit is a graphical git interface made with the MSEgui toolkit. Design goals: to build a handy and productive tool which meets the "MSEide phi

Re: [fpc-pascal] possible json parser memory leak

2011-12-18 Thread ik
On Sun, Dec 18, 2011 at 19:39, Michael Van Canneyt wrote: > > > On Sun, 18 Dec 2011, ik wrote: > > Hello, >> >> I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser. >> >> I've written the following code: >> >> --- >> uses fpjson, jsonparser, SysUtils, classes; >> >> var >>

Re: [fpc-pascal] debian control files for fpc

2011-12-18 Thread David Emerson
I solved this problem by downloading the sources from debian, which apparently have a different directory structure layout. ~D. On Sun 18 Dec 2011, David Emerson wrote: > > > Where can I find debian control files for fpc? > > > > In the fpcbuild svn repository: > > http://svn.freepascal.org/sv

Re: [fpc-pascal] News from MSEide+MSEgui

2011-12-18 Thread David Emerson
Congratulations, Martin! Keep up the good work. (is that your own custom-built git gui?) On Mon 12 Dec 2011, Martin Schreiber wrote: > Hi, > > MSEide+MSEgui 2.8rc1 for FPC 2.6 has been released: > > http://sourceforge.net/projects/mseide-msegui/files/mseide-msegui/2.8rc1/ > > There is also a n

[fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat

2011-12-18 Thread Mattias Gaertner
Hi, For some reason TFPHTTPClient.Post hangs when accessing a "solr" server over "tomcat". It works with "solr" over "jetty". "curl" works fine with both, so I guess the tomcat server works normally. Here is the code: client:=TFPHTTPClient.Create(nil); client.RequestHeaders.Add('Content-

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread David Emerson
On Sun 18 Dec 2011, Jürgen Hestermann wrote: > David Emerson schrieb: > > 2. is it possible to overload the 'in' operator, so that it may work > > (using supplied code) on things that are not a pascal set? > > I do not know whether it is possible but I hate such overloading. An > operator define

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread David Emerson
Thank you, Tomas, those are all excellent suggestions! I am glad I asked. On Sun 18 Dec 2011, Tomas Hajny wrote: > On 17 Dec 11, at 21:07, David Emerson wrote: > > > two little questions > > > > 1. Is it possible to make an alias to a function ... so rather than just > > re-calling with the sam

Re: [fpc-pascal] debian control files for fpc

2011-12-18 Thread David Emerson
> > Where can I find debian control files for fpc? > > In the fpcbuild svn repository: > http://svn.freepascal.org/svn/fpcbuild/trunk/install/debian/ > > Vincent Thanks much!! I wish it worked :( I copied all the debian control files from the 2.4.4 release: http://svn.freepascal.org/svn/fpcbui

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread Marcos Douglas
2011/12/18 Tomas Hajny > > On 18 Dec 11, at 10:31, Marcos Douglas wrote: > > On Sun, Dec 18, 2011 at 9:37 AM, Tomas Hajny wrote: > > > On 17 Dec 11, at 21:07, David Emerson wrote: > > > > > >> two little questions > > >> > > >> 1. Is it possible to make an alias to a function ... so rather than j

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread Tomas Hajny
On 18 Dec 11, at 10:31, Marcos Douglas wrote: > On Sun, Dec 18, 2011 at 9:37 AM, Tomas Hajny wrote: > > On 17 Dec 11, at 21:07, David Emerson wrote: > > > >> two little questions > >> > >> 1. Is it possible to make an alias to a function ... so rather than just > >> re-calling with the same parame

Re: [fpc-pascal] possible json parser memory leak

2011-12-18 Thread ik
On Sun, Dec 18, 2011 at 22:27, Frank Church wrote: > > > On 18 December 2011 17:34, silvioprog wrote: > >> 2011/12/18 ik : >> > Hello, >> > >> > I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser. >> > >> > I've written the following code: >> >> Use: >> >> var >> parser: TJSONParser; >> js

Re: [fpc-pascal] possible json parser memory leak

2011-12-18 Thread Frank Church
On 18 December 2011 17:34, silvioprog wrote: > 2011/12/18 ik : > > Hello, > > > > I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser. > > > > I've written the following code: > > Use: > > var > parser: TJSONParser; > json_data: TJSONData; > json_file: TFileStream; > begin > json_file := T

Re: [fpc-pascal] possible json parser memory leak

2011-12-18 Thread ik
On Sun, Dec 18, 2011 at 19:34, silvioprog wrote: > 2011/12/18 ik : > > Hello, > > > > I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser. > > > > I've written the following code: > > Use: > > var > parser: TJSONParser; > json_data: TJSONData; > json_file: TFileStream; > begin > json_file

Re: [fpc-pascal] possible json parser memory leak

2011-12-18 Thread Michael Van Canneyt
On Sun, 18 Dec 2011, ik wrote: Hello, I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser. I've written the following code: --- uses fpjson, jsonparser, SysUtils, classes; var   parser    : TJSONParser;   json_file : TFileStream;  begin   json_file := TFileStream.Cr

Re: [fpc-pascal] possible json parser memory leak

2011-12-18 Thread silvioprog
2011/12/18 ik : > Hello, > > I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser. > > I've written the following code: Use: var parser: TJSONParser; json_data: TJSONData; json_file: TFileStream; begin json_file := TFileStream.Create('test.json', fmOpenRead); parser := TJSONParser.Cre

[fpc-pascal] possible json parser memory leak

2011-12-18 Thread ik
Hello, I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser. I've written the following code: --- uses fpjson, jsonparser, SysUtils, classes; var parser: TJSONParser; json_file : TFileStream; begin json_file := TFileStream.Create('/tmp/test.json', fmOpenRead);

Re: [fpc-pascal] Memory leak

2011-12-18 Thread dhkblaszyk
On 18 dec '11, Jonas Maebe wrote: > If you use freemem or reallocmem, then you will get a memory leak because freemem/reallocmem do not finalize the memory before freeing it. You have to manually call finalize() on the records inside that memory block prior to freeing them via freemem/realloc

Re: [fpc-pascal] Memory leak

2011-12-18 Thread dhkblaszyk
On 18 dec '11, Jonas Maebe wrote: > On 18 Dec 2011, at 15:45, dhkblas...@zeelandnet.nl [1]wrote: > >> It was an ansistring indeed, and finalize did the trick! Thanks for your help. How does New and Dispose work btw? Do they use RTTI to call finalize appropriatly? > > Yes. > >> I tried sear

Re: [fpc-pascal] Memory leak

2011-12-18 Thread Jonas Maebe
On 18 Dec 2011, at 15:45, dhkblas...@zeelandnet.nl wrote: > It was an > ansistring indeed, and finalize did the trick! Thanks for your help. How > does New and Dispose work btw? Do they use RTTI to call finalize > appropriatly? Yes. > I tried searching the New and Dispose implementations in > t

Re: [fpc-pascal] Memory leak

2011-12-18 Thread dhkblaszyk
On 18 dec '11, Jonas Maebe wrote: > On 18 Dec 2011, at 14:04, dhkblas...@zeelandnet.nl [1]wrote: > >> mytest^.name := Format('%s.%.3d', ['name', 1]); This assigns 'name.001' to the pointer variable but causes a memleak. If I assign the same value as string constant no memleak occurs, so it m

Re: [fpc-pascal] Memory leak

2011-12-18 Thread Jonas Maebe
On 18 Dec 2011, at 14:04, dhkblas...@zeelandnet.nl wrote: > mytest^.name := Format('%s.%.3d', ['name', 1]); > > This assigns > 'name.001' to the pointer variable but causes a memleak. If I assign the > same value as string constant no memleak occurs, so it must be something > related to format.

[fpc-pascal] Memory leak

2011-12-18 Thread dhkblaszyk
While dabbling with pointers, I came across a memleak for which I don't understand why it happens. Hopefully someone can help me with it. mytest^.name := Format('%s.%.3d', ['name', 1]); This assigns 'name.001' to the pointer variable but causes a memleak. If I assign the same value as strin

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread Marcos Douglas
On Sun, Dec 18, 2011 at 9:37 AM, Tomas Hajny wrote: > On 17 Dec 11, at 21:07, David Emerson wrote: > >> two little questions >> >> 1. Is it possible to make an alias to a function ... so rather than just >> re-calling with the same parameters, it's actually the same thing? like the >> way >> we c

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread Jürgen Hestermann
David Emerson schrieb: > 1. Is it possible to make an alias to a function ... so rather than just > re-calling with the same parameters, it's actually the same thing? like the way > we can do, e.g., type natural = cardinal, or const GG = 6, but with a function? I think you can declare a type

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread Tomas Hajny
On 17 Dec 11, at 21:07, David Emerson wrote: > two little questions > > 1. Is it possible to make an alias to a function ... so rather than just > re-calling with the same parameters, it's actually the same thing? like the > way > we can do, e.g., type natural = cardinal, or const GG = 6, but

Re: [fpc-pascal] debian control files for fpc

2011-12-18 Thread Vincent Snijders
2011/12/18 David Emerson : > I'd like to roll my own fpc-2.4.4 .deb for in-house development > > The lazarus sources seem to include a debian directory with all the control > files, which is wonderful! > > Where can I find debian control files for fpc? In the fpcbuild svn repository: http://svn.fr

[fpc-pascal] debian control files for fpc

2011-12-18 Thread David Emerson
I'd like to roll my own fpc-2.4.4 .deb for in-house development The lazarus sources seem to include a debian directory with all the control files, which is wonderful! Where can I find debian control files for fpc? Thanks, David ___ fpc-pascal maillis

Re: [fpc-pascal] alias a function + overload 'in'

2011-12-18 Thread Howard Page-Clark
On 18/12/11 5:07, David Emerson wrote: 1. Is it possible to make an alias to a function ... so rather than just re-calling with the same parameters, it's actually the same thing? like the way we can do, e.g., type natural = cardinal, or const GG = 6, but with a function? There's always the simp