mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* 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
This commit is contained in:
parent
b4236d6e71
commit
73f94bb851
9 changed files with 33 additions and 30 deletions
8
struct.c
8
struct.c
|
@ -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, ...)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue