Skip to content

Commit

Permalink
* array.c: moved to ANSI function style from K&R function style.
Browse files Browse the repository at this point in the history
  (used protoize on windows, so still K&R remains on #ifdef part of
   other platforms. And  `foo _((boo))' stuff is still there)
   [ruby-dev:26975]

* bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c,
  enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c,
  io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c,
  prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c,
  regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c,
  sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c,
  version.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
ocean committed Sep 12, 2005
1 parent 51e2554 commit dda5dc0
Show file tree
Hide file tree
Showing 44 changed files with 2,211 additions and 5,308 deletions.
15 changes: 15 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
Mon Sep 12 19:26:29 2005 Hirokazu Yamamoto <[email protected]>

* array.c: moved to ANSI function style from K&R function style.
(used protoize on windows, so still K&R remains on #ifdef part of
other platforms. And `foo _((boo))' stuff is still there)
[ruby-dev:26975]

* bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c,
io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c,
prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c,
regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c,
sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c,
version.c: ditto.

Sun Sep 11 23:23:02 2005 Shugo Maeda <[email protected]>

* lib/net/imap.rb (starttls): supported the STARTTLS command.
Expand Down
10 changes: 2 additions & 8 deletions array.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,7 @@ rb_ary_new(void)
return rb_ary_new2(ARY_DEFAULT_SIZE);
}

#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

VALUE
rb_ary_new3(long n, ...)
Expand All @@ -152,7 +146,7 @@ rb_ary_new3(long n, ...)

ary = rb_ary_new2(n);

va_init_list(ar, n);
va_start(ar, n);
for (i=0; i<n; i++) {
RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
}
Expand Down Expand Up @@ -184,7 +178,7 @@ rb_values_new(long n, ...)
long i;

val = ary_new(rb_cValues, n);
va_init_list(ar, n);
va_start(ar, n);
for (i=0; i<n; i++) {
RARRAY(val)->ptr[i] = va_arg(ar, VALUE);
}
Expand Down
Loading

0 comments on commit dda5dc0

Please sign in to comment.