Hi !

I have played a lot with the GHDL strings recently,
I know how to process them in C when a VHDL function
calls my C code. However I don't know how to do this :

I have one VHDL function that contains a local string
that I want to send back to the C code, here is a rought idea :

function something(i : integer) return string is
   variable s : string(1 to i);
begin
   -- something
   return s;
end something;

When called from another VHDL code, it works, but when called
from a C function, it complains at runtime and stops everything.

I suppose that the return value and format is different from
how a string is sent to a child function (as a pointer to a structure).

I don't want to spend my time reverse-engineering, so :
how does one use a C function to get a string from VHDL,
and/or return this string itself to other VHDL code ?
Can someone decribe the ABI ?

thanks in advance :-)

yg
-- 
http://ygdes.com / http://yasep.org


_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to