[fpc-pascal] a queried interface destroyed after writeln the address of it

2012-08-22 Thread ZAN DoYe
I don't know if it's an undefined behavior or a bug. The environment is fpc 2.6-bugfix branch x86-64 linux. See the details in the attached code program t2; {$mode objfpc} uses sysUtils; type ip= interface ['{f0cea771-a3f1-4223-bea2-c46c5f0f61fa}'] end; iq= interfac

Re: [fpc-pascal] Easier fpmake

2012-08-22 Thread Tomas Hajny
On 22 Aug 12, at 19:03, Michael Van Canneyt wrote: Hi Michael, > As you know, FPC uses fpmake to compile everything in packages. > > As I've been steadily improving fcl-passrc for fpdoc, > (it's now almost on par with the compiler, barring errors and assembler > statetements), > I created a

Re: [fpc-pascal] Unit testing aid...

2012-08-22 Thread Martin
On 22/08/2012 18:08, Michael Van Canneyt wrote: Hi, for those that do unit testing, I committed a small tool "pas2ut" which analyses a unit, and creates a unit with a number of (empty) test cases. Obviously, the unit should be compileable (well, at least it must be parseable). I just updat

Re: [fpc-pascal] Unit testing aid...

2012-08-22 Thread Graeme Geldenhuys
On 22 August 2012 18:47, Daniel Gaspary wrote: > The obvious example: insert calls to logging procedures at the enter > and exit of each method, procedure or function of a unit. This is already possible for some time. Take a look at the 'fpprofiler' project. I have a version of it that I worked

Re: [fpc-pascal] Unit testing aid...

2012-08-22 Thread Daniel Gaspary
On Wed, Aug 22, 2012 at 2:08 PM, Michael Van Canneyt > I would appreaciate feedback and suggestions. I believe could be interesting to have a similar tool to generate "annotations" to a unit(or set of units). The obvious example: insert calls to logging procedures at the enter and exit of each m

[fpc-pascal] Unit testing aid...

2012-08-22 Thread Michael Van Canneyt
Hi, for those that do unit testing, I committed a small tool "pas2ut" which analyses a unit, and creates a unit with a number of (empty) test cases. Obviously, the unit should be compileable (well, at least it must be parseable). The output is very configurable, and should cover a lot of case

[fpc-pascal] Easier fpmake

2012-08-22 Thread Michael Van Canneyt
Hi, As you know, FPC uses fpmake to compile everything in packages. As I've been steadily improving fcl-passrc for fpdoc, (it's now almost on par with the compiler, barring errors and assembler statetements), I created a small tool pas2fpm which takes as input a bunch of unit names, and outpu

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread michael . vancanneyt
On Wed, 22 Aug 2012, Ludo Brands wrote: There are more problems: the library name is not cross-platform, so the project will no longer be cross-platform. Which is a far more serious problem, IMHO. (and one which would exist even if I had followed your suggestion of implementing the property in

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Marcos Douglas
On Wed, Aug 22, 2012 at 11:05 AM, Sven Barth wrote: > Am 22.08.2012 12:37, schrieb Timothy Madden: > >> On 08/22/2012 09:57 AM, Marco van de Voort wrote: >>> >>> In our previous episode, Marcos Douglas said: >> >> [...] >>> >>> > Requiring all functions to be allways fully qualified will make

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Marcos Douglas
On Wed, Aug 22, 2012 at 9:22 AM, Jonas Maebe wrote: > > Jürgen Hestermann wrote on Wed, 22 Aug 2012: > > >> Am 2012-08-22 13:45, schrieb Lukasz Sokol: >>> >>> Recompilation when one of units/libraries was upgraded, almost always >>> implies >>> rebuild. Who on Earth is so trigger-happy to upgrade,

Re: [fpc-pascal] Link against .so generated by ppumove

2012-08-22 Thread Jonas Maebe
leledumbo wrote on Wed, 22 Aug 2012: I've created a .so from a unit by compiling it to .ppu and .o and then executes ppumove on the .ppu. Now I've got the .so and .ppl (extension specified with -e), how can I tell fpc to link against them instead of the .ppu and .o? I've tried with -XD with no

[fpc-pascal] Link against .so generated by ppumove

2012-08-22 Thread leledumbo
I've created a .so from a unit by compiling it to .ppu and .o and then executes ppumove on the .ppu. Now I've got the .so and .ppl (extension specified with -e), how can I tell fpc to link against them instead of the .ppu and .o? I've tried with -XD with no success. -- View this message in conte

Re: [fpc-pascal] EControlC instead of EZeroDivide when using SSE instructions

2012-08-22 Thread Sven Barth
Am 22.08.2012 13:47, schrieb OBones: Jonas Maebe wrote: OBones wrote on Wed, 22 Aug 2012: Olivier SANNIER wrote: Does any of you have any suggestion as to explain this behavior, and best of all, how to fix it? I went further and changed the code this so that I can get better details as to w

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-22 Thread Marcos Douglas
On Wed, Aug 22, 2012 at 3:57 AM, Marco van de Voort wrote: > In our previous episode, Marcos Douglas said: >> Yes, we know too... but how prevent this using third-party libs? >> For example, what do you think if I have a project that have a file >> called lnet.pas? Can I use this identifier? > > A

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Sven Barth
Am 22.08.2012 12:37, schrieb Timothy Madden: On 08/22/2012 09:57 AM, Marco van de Voort wrote: In our previous episode, Marcos Douglas said: [...] Requiring all functions to be allways fully qualified will make the most commom case worse than current implementation just to be better for the

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> There are more problems: the library name is not > cross-platform, so the project will no longer be > cross-platform. Which is a far more serious problem, IMHO. > (and one which would exist even if I had followed your > suggestion of implementing the property in TSQLConnection). > That is no

Re: [fpc-pascal] EControlC instead of EZeroDivide when using SSE instructions

2012-08-22 Thread OBones
Jonas Maebe wrote: OBones wrote on Wed, 22 Aug 2012: Jonas Maebe wrote: You can try debugging syswin32_i386_exception_handler in rtl/win32/system.pp to see what exception Win32 reports instead. Thanks for the confirmation as I was heading that way when I posted the message, without much ho

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Jonas Maebe
Jürgen Hestermann wrote on Wed, 22 Aug 2012: Am 2012-08-22 13:45, schrieb Lukasz Sokol: Recompilation when one of units/libraries was upgraded, almost always implies rebuild. Who on Earth is so trigger-happy to upgrade, rebuild and not test for regressions? This is the only sane way to get the

Re: [fpc-pascal] EControlC instead of EZeroDivide when using SSE instructions

2012-08-22 Thread Jonas Maebe
OBones wrote on Wed, 22 Aug 2012: Jonas Maebe wrote: You can try debugging syswin32_i386_exception_handler in rtl/win32/system.pp to see what exception Win32 reports instead. Thanks for the confirmation as I was heading that way when I posted the message, without much hope. But now that I

Re: [fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Jürgen Hestermann
Am 2012-08-22 13:45, schrieb Lukasz Sokol: > Recompilation when one of units/libraries was upgraded, almost always implies > rebuild. Who on Earth is so trigger-happy to upgrade, rebuild and not test for > regressions? This is the only sane way to get the process going - document it > *as MML said

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread michael . vancanneyt
On Wed, 22 Aug 2012, Ludo Brands wrote: (In the IDE: drop, set connector type from picklist, maybe change library name, set to enabled). I'm having some problems using this in the IDE. The picklist is empty. Probably something missing in procedure TSQLDBConnectorTypePropertyEditor.GetValues

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> Also, if I understand the mode of operation correctly, the > TSQLDBLibraryLoader, when enabled, loads the library before > the TxxxConnection tries to load it. But how can you be sure > TSQLDBLibraryLoader is streamed before a TxxxConnection that > has connected set to true > Previous messag

Re: [fpc-pascal] EControlC instead of EZeroDivide when using SSE instructions

2012-08-22 Thread OBones
Jonas Maebe wrote: OBones wrote on Wed, 22 Aug 2012: Olivier SANNIER wrote: Does any of you have any suggestion as to explain this behavior, and best of all, how to fix it? I went further and changed the code this so that I can get better details as to where the exception is coming from:

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Lukasz Sokol
On 21/08/2012 17:43, Timothy Madden wrote: > On 08/21/2012 03:10 PM, Jorge Aldo G. de F. Junior wrote: >> "With no error messages, or even with no changes to the program since 1 >> and a half year in the repository, the scientific calculations are now >> all blown up, and program outputs only error

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread michael . vancanneyt
On Wed, 22 Aug 2012, Ludo Brands wrote: After recent discussions about which library to load when loading DB client libraries, I changed the default names for Firebird, MySQL, Postgres. That was well in time ;) Thanks. Another little bug and patch in http://bugs.freepascal.org/view.php?id

Re: [fpc-pascal] EControlC instead of EZeroDivide when using SSE instructions

2012-08-22 Thread Jonas Maebe
OBones wrote on Wed, 22 Aug 2012: Olivier SANNIER wrote: Does any of you have any suggestion as to explain this behavior, and best of all, how to fix it? I went further and changed the code this so that I can get better details as to where the exception is coming from: EControlC is the tra

Re: [fpc-pascal] EControlC instead of EZeroDivide when using SSE instructions

2012-08-22 Thread OBones
Olivier SANNIER wrote: Does any of you have any suggestion as to explain this behavior, and best of all, how to fix it? I went further and changed the code this so that I can get better details as to where the exception is coming from: program test; uses sysutils, classes; function GetMX

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> (In the IDE: drop, set connector type from picklist, maybe > change library name, set to enabled). > I'm having some problems using this in the IDE. The picklist is empty. Probably something missing in procedure TSQLDBConnectorTypePropertyEditor.GetValues( Proc: TGetStrProc); Var L : TSt

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Timothy Madden
On 08/22/2012 11:30 AM, Sven Barth wrote: > Am 21.08.2012 21:42, schrieb Jorge Aldo G. de F. Junior: >> Instead of implementing the half-assed C++ namespace model, just add >> to the compiler a warning when it detects that there is a collision in >> the current scope (two functions with the same pa

[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

2012-08-22 Thread Timothy Madden
On 08/22/2012 09:57 AM, Marco van de Voort wrote: > In our previous episode, Marcos Douglas said: [...] > >>> Requiring all functions to be allways fully qualified will make the >>> most commom case worse than current implementation just to be better >>> for the uncommon case. This is a step back,

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> > After recent discussions about which library to load when > loading DB client libraries, I changed the default names for > Firebird, MySQL, Postgres. > That was well in time ;) Thanks. Another little bug and patch in http://bugs.freepascal.org/view.php?id=22691 Ludo

[fpc-pascal] FPC unit testing generation program

2012-08-22 Thread Reinier Olislagers
Just saw this commit fly by: r22165 | michael | 2012-08-21 21:43:26 +0200 (di, 21 aug 2012) | 1 line * pas2ut, initial version (create unit tests from pascal unit) That looks very interesting! Thanks for this, I'll look into it. Regards, Reinier ___ f

Re: [fpc-pascal] How to avoid namespace name clashes after USES ?

2012-08-22 Thread Sven Barth
Am 21.08.2012 21:42, schrieb Jorge Aldo G. de F. Junior: Instead of implementing the half-assed C++ namespace model, just add to the compiler a warning when it detects that there is a collision in the current scope (two functions with the same parameters from different units that can be called fr

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Mark Morgan Lloyd
Michael Van Canneyt wrote: Hi, After recent discussions about which library to load when loading DB client libraries, I changed the default names for Firebird, MySQL, Postgres. araminta: >./loadlibdemo list Available connection types: Firebird, Default library name: libfbclient.so.2.5 MySQL 4.0