[fpc-devel]fpgtk problem

Peter Vreman peter at freepascal.org
Thu Apr 3 07:18:05 CEST 2003


> At 17.13 02/04/2003, you wrote:
> [...]
>>That will not solve the problem. The problem is that there is no
>> knowledge
>>how to push an array with X elements of a certain type to a C function.
>
> what? it's the simplest thing in the world. You loop through all the
> elements of the TVarRec array, last to first, and push them on the stack,
> then you push the formal arguments. Sure, it generates a lot of code, but
> it's not that hard. I mean, variable arrays store the length and TVarRec
> stores the type of the data, is there something I don't get?

How about data conversions like shortstring, floats? And also there is a
difference between pascal and C if the value or the address where the
value is stored is pushed.







More information about the fpc-devel mailing list