peter at freepascal.org
Sat Apr 5 11:36:37 CEST 2003
At 01:42 5-4-2003, you wrote:
>At 07.41 04/04/2003, you wrote:
>>You can't use a function to push the values, because returning from the
>>function will cleanup the stack.
>first, it was just pseudo-code. Second, Exit isn't a true function either.
>Nor Break. Nor WriteLn. Third, my point is that, despite it generates a
>lot of inline code, it isn't certainly impossible. And, fourth and last, I
>add: just like now there is a pseudo-type called "array of const" that the
>compiler handles in a special way, I don't see why there can't be a
>pseudo-type "TVAList" as well. FreePascal isn't interested in ISO
>compliance, right? so why bother?
We talked internally about adding support for va_start, va_end and the
va_list type. But that wouldn't solve the problem for fpgtk since those
functions don't get a va_list.
The problem with the fpgtk code is that it were macro's in C. And there is
no possibility to have an exact function equivalent for it except support
>>>>And also there is a difference between pascal and C if the value or the
>>>>address where the value is stored is pushed.
>>>Are you sure? I think there doesn't need to be any difference. Again, I
>>>think the Borland compiler already takes this in account
>>Sorry i don't understand what you want to make clear here. There is no
>>Borland compiler used at all.
>I was just saying that Delphi can pass arguments to C/C++ code flawlessly
>(apart from ellipses) and in the exact manner you'd expect, so I don't see
>why FreePascal can't
We can also pass arguments to C code flawlessly apart from the ellipses
More information about the fpc-devel