Christian Weisgerber <na...@mips.inka.de> wrote: > Landry Breuil: > > > I've had a quick look and got a bit lost in the maze, but my > > understanding is that via various aliases/defines, the function called > > is g_logv in > > https://gitlab.gnome.org/GNOME/glib/-/blob/main/glib/gmessages.c#L1291 - > > so the code should iterate on args and replace the NULL ones by '(null)' ? > > You can't tell by looking at an argument whether it is a a pointer > or a long (or a sign-extended int on most archs). You need to > examine the format string. > > Also, how do you replace an element in a va_list? I don't think > you can. I don't think you can construct a new va_list element by > element either.
Whoa, no way -- you cannot touch them. The pointers could be to objects that the caller uses for an additional purpose. There is no specification which says they have to be unique to this call.