public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* va_arglist
@ 2008-12-02 12:48 Austin, Alex
  2008-12-02 13:30 ` va_arglist Harvey Chapman
  2008-12-02 15:37 ` va_arglist Ian Lance Taylor
  0 siblings, 2 replies; 7+ messages in thread
From: Austin, Alex @ 2008-12-02 12:48 UTC (permalink / raw)
  To: gcc-help

Is there any way to write code to generate a variable argument list and call a variable function?

For example:

int callPrintf(char *format, void *args[])
{
	void **arg;
	for(arg = args; *arg != NULL; arg++)
		PushAnArgument(*arg);
	return printf(format);
}

I am trying to wrap a poorly-designed API in a Python extension module. There is no way to separate out the variable argument call to multiple calls.

Is this possible?
- Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-12-04  1:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-02 12:48 va_arglist Austin, Alex
2008-12-02 13:30 ` va_arglist Harvey Chapman
2008-12-02 15:39   ` va_arglist Austin, Alex
2008-12-02 18:24     ` va_arglist David Daney
2008-12-02 23:27       ` va_arglist Robert William Fuller
2008-12-04  1:37         ` va_arglist Austin, Alex
2008-12-02 15:37 ` va_arglist Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).