[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please help me understand va_alist

From: Bruno Haible
Subject: Re: Please help me understand va_alist
Date: Thu, 06 Feb 2020 18:24:58 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

> I think the man is a bit confusing because va_start_type or va_arg_type
> functions are defined in the source as va_arg_int(LIST) and using
> va_arg_type(alist[, arg_type]) in the manual seems to suggest that it
> expect an additional parameter?

The additional parameter exists only for struct types. For elementary
and pointer types there is no need to have it.

> Anyway, I still have an issue wrt va_start_type. I don't fully
> understand the purpose of _type in the va_start macro since it
> doesn't seem to return anything.

It needs to match the va_return_.... invocation.

The implementation would be more complicated if the return type
was not already known when the va_start_... is invoked.

> ps: if it's any useful, I'm using the ffcall library from Debian (oldstable) 
> that appears to be v1.10

I really suggest to use the newest release, 2.2. It produces fewer warnings,
has much improved portability, and has all known bugs fixed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]