Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-10

Problems with variants calling convenction

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Please,

is here anybody who can help me with variants internals? I have still problems with VariantArrays and calling convenctions.

Example:

function A(): Variant;
begin
end;
var
  V: variant;
begin
  V:=A();
end;

Why Result of the function a() is'nt a pointer to variable V, but is copied in fpc_finalize to variable V !!!! Isn't it unneeded slowing down??? And there is futhermore some bug in the returning VarArray.

I have some free time to help with developement, but i need some support from community.

Petr

Ing. Petr Kristan . EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice tel: +420 466335223 Czech Republic (Eastern Europe) fax: +420 466510709

Reply by email

Unknown author
to Unknown author
Show quoted text 23 lines
Please, is here anybody who can help me with variants internals? I have still problems with VariantArrays and calling convenctions. Example: function A(): Variant; begin end; var V: variant; begin V:=A(); end; Why Result of the function a() is'nt a pointer to variable V, but is copied in fpc_finalize to variable V !!!! Isn't it unneeded slowing down??? And there is futhermore some bug in the returning VarArray. I have some free time to help with developement, but i need some support from community.

Now i read in compiler/nld.pas:

{ call helpers for variant, they can contain non ref. counted types like vararrays which must be really copied }

But in Kylix aren't Variant results copied.

Petr

Ing. Petr Kristan . EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice tel: +420 466335223 Czech Republic (Eastern Europe) fax: +420 466510709

Reply by email