mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 16:12:33 +00:00
11 lines
204 B
C
11 lines
204 B
C
|
#include <stdarg.h>
|
||
|
|
||
|
void testFnPtr(int n, ...) {
|
||
|
va_list ap;
|
||
|
va_start(ap, n);
|
||
|
|
||
|
void (*fnPtr)(int) = va_arg(ap, void (*)(int));
|
||
|
int arg = va_arg(ap, int);
|
||
|
fnPtr(arg);
|
||
|
va_end(ap);
|
||
|
}
|