Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the names to be complient with ISO C. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions compiler/include/stdarg.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,30 @@

typedef char* va_list;

void va_start_impl(va_list* list,void* from)
static void __va_start_impl(va_list* list,void* from)
{
*list = from;
}



void* va_arg_impl(va_list* list,int size){
static void* __va_arg_impl(va_list* list,int size){
void* t = *list;
*list +=size;
return t;
}

void va_end_impl(va_list* list){
free(list);
free(*list);
static void __va_end_impl(va_list* list){

}




#define va_start(list,from) va_start_impl(&list,(&from)+1)
#define va_start(list,from) __va_start_impl(&list,(&from)+1)

#define va_arg(list,type) *(type*)(va_arg_impl(&list,sizeof(type)))
#define va_arg(list,type) *(type*)(__va_arg_impl(&list,sizeof(type)))

#define va_end(list) va_end_impl(&list)
#define va_end(list) __va_end_impl(&list)

#endif