Re: [fpc-devel] who can explain why array of const can't be passed to another array of const

2011-09-14 Thread Jonas Maebe
On 14 Sep 2011, at 10:40, Alexander Klenin wrote: On Wed, Sep 14, 2011 at 19:03, Jonas Maebe wrote: It's more that even though both are called "array of const", they are completely different things. They also don't support the same types. Perhaps varargs-compatible parameter type should be

Re: [fpc-devel] who can explain why array of const can't be passed to another array of const

2011-09-14 Thread Alexander Klenin
On Wed, Sep 14, 2011 at 19:03, Jonas Maebe wrote: > It's more that even though both are called "array of const", they are > completely different things. They also don't support the same types. Perhaps varargs-compatible parameter type should be called something else then? -- Alexander S. Klenin

Re: [fpc-devel] who can explain why array of const can't be passed to another array of const

2011-09-14 Thread Jonas Maebe
On 14 Sep 2011, at 04:15, Paul Ishenin wrote: If I change "cdecl" to "stdcall" in g_object_dosomething then it compiles with no error. For me it is strange. Should developer care about internal compiler representation of an "array of const" for different conventions? It's more that even

[fpc-devel] who can explain why array of const can't be passed to another array of const

2011-09-13 Thread Paul Ishenin
Hello devs. Please explain why the next example does not compiles with a message: "Error: Wrong type "Array Of Const" in array constructor"? program Project1; {$mode delphi}{$H+} function g_object_dosomething(AObject: Pointer; args: array of const): Boolean; cdecl; external 'test.dll'; ty