mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
drop varargs.h support
This header file is simply out of date (for decades since at least 1989). It's the 21st century. Just stop using it.
This commit is contained in:
parent
534277fa7b
commit
233c2018f1
4 changed files with 4 additions and 15 deletions
|
@ -1209,7 +1209,7 @@ new_insn_body(rb_iseq_t *iseq, int line_no, enum ruby_vminsn_type insn_id, int a
|
|||
va_list argv;
|
||||
if (argc > 0) {
|
||||
int i;
|
||||
va_init_list(argv, argc);
|
||||
va_start(argv, argc);
|
||||
operands = compile_data_alloc2(iseq, sizeof(VALUE), argc);
|
||||
for (i = 0; i < argc; i++) {
|
||||
VALUE v = va_arg(argv, VALUE);
|
||||
|
|
|
@ -15,11 +15,7 @@
|
|||
#include "ruby/internal/config.h"
|
||||
#include "ruby/defines.h"
|
||||
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "ruby/st.h"
|
||||
|
||||
|
|
|
@ -49,14 +49,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
#include <stdarg.h>
|
||||
#define va_init_list(a,b) va_start((a),(b))
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#define va_init_list(a,b) va_start((a))
|
||||
#endif
|
||||
|
||||
#include "ruby_assert.h"
|
||||
|
||||
|
|
|
@ -891,7 +891,7 @@ rb_funcall(VALUE recv, ID mid, int n, ...)
|
|||
if (n > 0) {
|
||||
long i;
|
||||
|
||||
va_init_list(ar, n);
|
||||
va_start(ar, n);
|
||||
|
||||
argv = ALLOCA_N(VALUE, n);
|
||||
|
||||
|
@ -1163,7 +1163,7 @@ rb_yield_values(int n, ...)
|
|||
va_list args;
|
||||
argv = ALLOCA_N(VALUE, n);
|
||||
|
||||
va_init_list(args, n);
|
||||
va_start(args, n);
|
||||
for (i=0; i<n; i++) {
|
||||
argv[i] = va_arg(args, VALUE);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue