Hi Alex,

So you’ve found it yourself, that the types and the number of args 
should not change between invocations.

So I’ve changed the native call syntax to mark variable-args functions,
instead of using a fresh binding for every call.

Regards,
Andras

> On 2020. Nov 6., at 8:07, Alexander Burger <a...@software-lab.de> wrote:
> 
> On Thu, Nov 05, 2020 at 11:00:39PM +0100, Alexander Burger wrote:
>> Also, I see no reason why 'native' should not work with normal variable-args
>> functions like printf() in pil21. As far as I see, it works fine.
>> 
>>   : (native "@" "printf" 'I "abc%d%s^J" (+ 3 4) (pack "X" "Y" "Z"))
>>   abc7XYZ
>>   -> 8
> 
> Well, this is not completely true. It works under certain conditions (if the
> types of the calls stay the same, and the number of args is not increased in
> subsequent calls). Even such cases can be handled though, by simply using a
> fresh transient for the function argument symbol.
> 
> ☺/ A!ex
> 
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to