After this patch the code is compilable but some functions fails with a
SIGSEGV. Looking at code again I found that some function names
"AddRef", "Invoke" and others that are present in base interface
(IUnknown and IDispatch) are removed from the generated output.
After comment out this lines the code generated works mostly as expected
(except another bug explained later) and a function "AddRef" appears in
the middle of some interface definitions.
So my question is. Is fpc binding interface functions based in its index
? I think the answer is yes so removing that "reserved" names crash the
binding when a custom function with that name appears in the middle of
To solve this problem there are 2 solutions from my point of view, one
is add it as is as (what my internal patch does now) or rename the
function so it does not clash with inherited "AddRef" in example.
The other bug is that I had found intefaces which export a property_put
with ByRef parameter, so it can not be mapped to a pascal property, so I
had changed this conflictive functions to no emit a "property read" code.
Currently tipelib.pas generated code like this interface:
procedure Set_Value(var Param1: Widestring);
function Get_Value: WideString;
property Value read Get_Value write Set_Value;
Which can not be compiled due the "var" in the Set_* procedure.
I hope that one devel can review and apply the patch in the bug report