Re: [fpc-devel] Free Pascal Extender
On Sat, Oct 30, 2010 at 16:53, Hans-Peter Diettrich drdiettri...@aol.com wrote: The SourceForge fpcext project http://sourceforge.net/p/fpcext/home/ shall allow to customize and extend the FPC compiler, with e.g. alternative components and languages. Are you sure you do not want to use Github? -- Alexander S. Klenin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Free Pascal Extender
On 30 October 2010 09:59, Alexander Klenin wrote: Are you sure you do not want to use Github? There is nothing wrong with SourceForge.net't git setup, it works just as good as GitHub. The benefit of SourceForge is that they give you plenty of other project related tools too. eg: a location for a website, various bug trackers, wikis, mailing lists etc etc... So for overall project management, SourceForge is a much better choice. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net:8080/fpgui/ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] need to call FpFlock to unlock file in FileClose?
On Sat, 30 Oct 2010, Vinzent Höfler wrote: On Sat, 30 Oct 2010 00:18:15 +0200, Seth Grover sethdgro...@gmail.com wrote: My question is this: if FileOpen automagically handles the file locking through a call to DoFileLocking, wouldn't it be more correct for FileClose handle unlocking as well? It should, if it's necessary. Interestingly man 2 flock says: |Furthermore, the lock is released either by an explicit LOCK_UN operation on |any of these duplicate descriptors, or when all such descriptors have been |closed. So I would expect the lock to disappear when the file is closed. Nitpicking people might say, this only applies to duplicated descriptors, but then what's the point? So, actually I'm inclined to consider that a bug in the underlying OS. I tend to agree with this. The reason the explicit unlock is not done is that the close should do it implicitly (as per the man page). But are you sure the first close() operation actually succeeded ? Michael.___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Free Pascal Extender
Graeme Geldenhuys schrieb: On 30 October 2010 09:59, Alexander Klenin wrote: Are you sure you do not want to use Github? There is nothing wrong with SourceForge.net't git setup, it works just as good as GitHub. The benefit of SourceForge is that they give you plenty of other project related tools too. eg: a location for a website, various bug trackers, wikis, mailing lists etc etc... So for overall project management, SourceForge is a much better choice. Just encountered a problem: when I add FPDoc documentation, currently residing in compiler/docs/, the content should be available in all branches, updates should not be affected by checking out other branches. Questions to the gurus: How can I add this directory to the git repository, so that it is available as a self-contained project/branch? Since most of the (current) documentation applies to FPC in general, where should such documentation reside, in the (SVN) directory tree? How to separate general docs from branch-related docs? DoDi ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Free Pascal Extender
On 30 October 2010 15:43, Hans-Peter Diettrich wrote: How can I add this directory to the git repository, so that it is available as a self-contained project/branch? SourceForge.net allows unlimited git repositories per project. Each repository is stand-alone, but under the same sourceforge project. Not sure if this is what you want, but there is another option. I think it's called git modules, where you can have multiple repository working together in one hierarchy. I have no idea how to set this up though, I have never used that feature. I know KDE project does. Just read the git docs, they should explain it there. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net:8080/fpgui/ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Problem with cascading Destructor in fpc 2.4
Hi I introduced an boolean-option to the destructor of a class. I implemented a wrapper without argument for reason of backward-compability. This wrapper calls the real destructor with default argument. Everything worked fine until fpc 2.4 (sample programm below) When running it compiled with fpc 2.4 i get an Runtime error 216 (segmentation fault). I could reproduce the problem with the latest svn head. Without further examination i suggest: The outer destructor tries to free the memory the inner destructor already released. So my question: Is it a bug or am i doing something i should not? The compiler gives me am note: test.pas(8,3) Note: Class should have one destructor only -- Best regards, Martin program cascading_destructor; type test=class constructor create(); destructor destroy();overload; destructor destroy(arg:boolean);overload; end; constructor test.create(); begin end; destructor test.destroy(); begin writeln('calling master destroy'); destroy(true); writeln('master destroy done'); end; destructor test.destroy(arg:boolean); begin writeln('destroyed'); end; var a:test; begin a:=test.create(); a.destroy; end. type test=class constructor create(); destructor destroy();overload; destructor destroy(arg:boolean);overload; end; constructor test.create(); begin end; destructor test.destroy(); begin writeln('calling master destroy'); destroy(true); writeln('master destroy done'); end; destructor test.destroy(arg:boolean); begin writeln('destroyed'); end; var a:test; begin a:=test.create(); a.destroy; end. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Problem with cascading Destructor in fpc 2.4
Al 30/10/10 17:54, En/na Martin Krüger ha escrit: So my question: Is it a bug or am i doing something i should not? The compiler gives me am note: test.pas(8,3) Note: Class should have one destructor only If I remember correctly you should never call destroy directly, only free (which in turn will call your destructor). Bye -- Luca ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Problem with cascading Destructor in fpc 2.4
On Sat, 30 Oct 2010, Martin Krüger wrote: Hi I introduced an boolean-option to the destructor of a class. I implemented a wrapper without argument for reason of backward-compability. This wrapper calls the real destructor with default argument. Everything worked fine until fpc 2.4 (sample programm below) When running it compiled with fpc 2.4 i get an Runtime error 216 (segmentation fault). I could reproduce the problem with the latest svn head. Without further examination i suggest: The outer destructor tries to free the memory the inner destructor already released. So my question: Is it a bug or am i doing something i should not? The compiler gives me am note: test.pas(8,3) Note: Class should have one destructor only This is your problem. The destructor must always be called destroy (overriding TObject.Destroy) and should accept no arguments. If you want to pass an argument to it somehow, use a property which you set prior to calling destroy. Michael.___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Problem with cascading Destructor in fpc 2.4
On Sat, 30 Oct 2010 17:54:13 +0200, Martin Krüger martin.krue...@gmx.com wrote: I introduced an boolean-option to the destructor of a class. Actually, you seem to be violating basic object oriented paradigms here. An object should always know from its current state how to destruct itself, so why should a destructor need a parameter? Vinzent. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel