Pablo Galindo Salgado <[email protected]> added the comment:
The va_start macro just sets up a pointer to the first function parameter,
e.g.:-
void func (int a, ...)
{
// va_start
char *p = (char *) &a + sizeof a;
}
which makes p point to the second parameter. The va_arg macro does this:-
void func (int a, ...)
{
// va_start
char *p = (char *) &a + sizeof a;
// va_arg
int i1 = *((int *)p);
p += sizeof (int);
// va_arg
int i2 = *((int *)p);
p += sizeof (int);
// va_arg
long i2 = *((long *)p);
p += sizeof (long);
}
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45325>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com