[fpc-pascal] Firebird embedded supported on Windows 64 by SEH patch

2013-03-08 Thread Reinier Olislagers
Sergei Gorelkin enabled Win64 SEH support in trunk r23732:

* Make Win64 SEH support enabled by default. If necessary to disable,
compiler should be cycled with OPT=-dDISABLE_WIN64_SEH. Mantis #24012.

Seems this fixes issues on Win64 with e.g. embedded Firebird dlls, and
I'm sure many other DLLs.

Thanks a lot, Sergei!

Regards,
Reinier
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-08 Thread Joao Morais
On Fri, Mar 8, 2013 at 4:09 PM, Flávio Etrusco  wrote:
>
>> procedure addintf(const aintf: IUnknown);
>> (...)
>> addintf(TInterfacedObject.Create);
>> (...)
>
> It's a pity, but I don't know whether it's fixable (or if needs to be
> "fixed") in the compiler.

Works in Delphi 7 with FastMM4.

> The TInterfacedObject has RefCount = 0 after construction, so you
> should always to assign it to a variable.
> In a sense a RefCounted object only exists while someone has a
> reference to it, so in that case the object non-existant ;-)

Correct. I am using an interface reference -- in the indexOf() method
in my sample -- before its "definitive persistence" as an intflist
member, and without a "real" variable that holds the instance alive
because of the const parameter.

You are suggesting that this unlikely coincidente which causes a
sigsegv should be the programmer's responsibility. No thanks, I much
more prefer the Delphi compatibility =)

Joao Morais
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-08 Thread Flávio Etrusco
>
> var
>   vintfl: TInterfaceList;
>

BTW You should use a IInterfaceList variable

> procedure addintf(const aintf: IUnknown);
> (...)
> addintf(TInterfacedObject.Create);
> (...)

It's a pity, but I don't know whether it's fixable (or if needs to be
"fixed") in the compiler.
The TInterfacedObject has RefCount = 0 after construction, so you
should always to assign it to a variable.
In a sense a RefCounted object only exists while someone has a
reference to it, so in that case the object non-existant ;-)

-Flávio
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal