curl / Mailing Lists / curl-library / Single Mail


Re: [PATCH 0/5] Add some curl*va() API functions

From: Ioan-Adrian Ratiu <>
Date: Mon, 23 Jan 2017 14:16:01 +0200

On Fri, 20 Jan 2017, Dan Fandrich <> wrote:
> On Fri, Jan 20, 2017 at 05:42:39PM +0200, Ioan-Adrian Ratiu wrote:
>> These API functions with a va_list parameter are in addition to the
>> existing functions using "..." and are useful in case the library-caller is
>> also a function getting "..." variable arguments, so the caller can pass its
>> args to the library using the va-list. Doing this is impossible with the
>> existing libcurl "..." functions because the caller has no way of passing
>> its "..." args except by using a va_args list.
>> Ioan-Adrian Ratiu (5):
>> curl_easy_getinfo: Add va() API function
>> curl_easy_setopt: Add va() API function
>> curl_formadd: Add va() API function
>> curl_multi_setopt: Add va() API function
>> curl_share_setopt: Add va() API function
> What would be the real-life use case for these? The "variable" argument list
> in all but one of these functions isn't actually variable; there is exactly one
> argument in each case. And there was a recent proposal to revamp the curl form
> functions entirely:

I really have to re-analyze the use cases for these functions in our use
of the library, what you say makes complete sense. This is very old legacy
code I've inherited and very probably needs to be rewritten to not use
var args in the first place for functions taking a single argument.

However I have one question: Why were these libcurl functions written
using `...` args when they really take only one?

>>>> Dan
> -------------------------------------------------------------------
> Unsubscribe:
> Etiquette:
Received on 2017-01-23