Reputation: 141
#ifndef STDARG_H_INCLUDED
#define STDARG_H_INCLUDED
typedef __builtin_va_list va_list;
#define va_start(v,l) __builtin_va_start(v,l) // I don't understand this
#define va_arg(v,l) __builtin_va_arg(v,l)
#define va_end(v) __builtin_va_end(v)
#endif
It seems that the author defines some kind of a macro function, but I don't understand how this function works?
Upvotes: 2
Views: 806
Reputation: 15121
#define va_start(v,l) __builtin_va_start(v,l)
simply means va_start(v,l)
will be replaced by __builtin_va_start(v,l)
, and this __builtin_va_start()
is obviously a builtin function or macro, it is implemented by the compiler or libc itself.
Upvotes: 6