We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e287bf1 commit 31bcff6Copy full SHA for 31bcff6
src/usr/include/stdarg.h
@@ -6,12 +6,12 @@ namespace std {
6
#endif
7
8
typedef struct va_list {
9
- int *base; // using int* to jmp at 4 bytes gap
+ void *base;
10
} va_list;
11
12
-#define va_start(list, last) ((list).base = (((int*)&(last))+1))
+#define va_start(list, last) ((list).base = (((void*)&(last))+1))
13
#define va_end(list) (list).base = NULL
14
-#define va_arg(list, type) (*(type*)((list).base++))
+#define va_arg(list, type) (*(type*)((list).base+=sizeof(type)))
15
#define va_copy(dst, src) (dst).base = (src).base
16
17
#ifdef __cplusplus
0 commit comments