diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-21 06:46:41 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-21 06:46:41 +0000 |
commit | 73f94bb851588f04e5189d37544e87884fc489c7 (patch) | |
tree | a7555eb0dfb5990d0fbe6e2c0877e2f57aaf4815 /struct.c | |
parent | b4236d6e71852135dd24c80da46b96ee55e1c0c4 (diff) |
* intern.h, struct.c (rb_struct_iv_get): constified.
* marshal.c: avoid one VC++6 warning for implicit conversion
from int to char.
* ruby.h: ANSI styled.
* bcc32/Makefile.sub (HAVE_HYPOT): added.
* ext/socket/extconf.rb: BeOS is only one platform should call
closesocket, so check __BEOS__ macro directly. (I was worried
accidently HAVE_CLOSESOCKET is defined on windows again because
it has it)
* ext/socket/{getaddrinfo.c,socket.c}: ditto.
... these are all cosmetic changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -17,7 +17,7 @@ VALUE rb_cStruct; static VALUE struct_alloc(VALUE); VALUE -rb_struct_iv_get(VALUE c, char *name) +rb_struct_iv_get(VALUE c, const char *name) { ID id; @@ -123,9 +123,9 @@ static VALUE rb_struct_ref7(VALUE obj) {return RSTRUCT(obj)->ptr[7];} static VALUE rb_struct_ref8(VALUE obj) {return RSTRUCT(obj)->ptr[8];} static VALUE rb_struct_ref9(VALUE obj) {return RSTRUCT(obj)->ptr[9];} -#define N_REF_FUNC (sizeof(ref_func) / sizeof(VALUE (*)())) +#define N_REF_FUNC (sizeof(ref_func) / sizeof(ref_func[0])) -static VALUE (*ref_func[])() = { +static VALUE (*ref_func[])(VALUE) = { rb_struct_ref0, rb_struct_ref1, rb_struct_ref2, @@ -214,8 +214,6 @@ make_struct(VALUE name, VALUE members, VALUE klass) return nstr; } -#include <stdarg.h> - VALUE rb_struct_define(const char *name, ...) { |