1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/coverage/coverage.c (rb_mCoverage): removed unneeded static variable.

* ext/socket/socket.c (unix_recv_io): ditto.

* ext/socket/socket.c (mConst): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-08-31 04:48:02 +00:00
parent 1105b5ded7
commit bb239558b8
3 changed files with 15 additions and 9 deletions

View file

@ -1,3 +1,11 @@
Sun Aug 31 13:47:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/coverage/coverage.c (rb_mCoverage): removed unneeded static variable.
* ext/socket/socket.c (unix_recv_io): ditto.
* ext/socket/socket.c (mConst): ditto.
Sun Aug 31 13:45:41 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): fix for

View file

@ -10,8 +10,6 @@
#include "ruby.h"
static VALUE rb_mCoverage;
extern VALUE rb_get_coverages(void);
extern void rb_set_coverages(VALUE);
extern void rb_reset_coverages(void);
@ -97,7 +95,7 @@ rb_coverage_result(VALUE klass)
void
Init_coverage(void)
{
rb_mCoverage = rb_define_module("Coverage");
VALUE rb_mCoverage = rb_define_module("Coverage");
rb_define_module_function(rb_mCoverage, "start", rb_coverage_start, 0);
rb_define_module_function(rb_mCoverage, "result", rb_coverage_result, 0);
}

View file

@ -2149,11 +2149,10 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
if (klass == Qnil)
return INT2FIX(fd);
else {
static ID for_fd = 0;
ID for_fd;
int ff_argc;
VALUE ff_argv[2];
if (!for_fd)
for_fd = rb_intern("for_fd");
CONST_ID(for_fd, "for_fd");
ff_argc = mode == Qnil ? 1 : 2;
ff_argv[0] = INT2FIX(fd);
ff_argv[1] = mode;
@ -3561,14 +3560,13 @@ sock_s_unpack_sockaddr_un(VALUE self, VALUE addr)
}
#endif
static VALUE mConst;
static void
sock_define_const(const char *name, int value)
sock_define_const(const char *name, int value, VALUE mConst)
{
rb_define_const(rb_cSocket, name, INT2FIX(value));
rb_define_const(mConst, name, INT2FIX(value));
}
#define sock_define_const(name, value) sock_define_const(name, value, mConst)
/*
* Class +Socket+ provides access to the underlying operating system
@ -3598,6 +3596,8 @@ sock_define_const(const char *name, int value)
void
Init_socket()
{
VALUE mConst;
rb_eSocket = rb_define_class("SocketError", rb_eStandardError);
rb_cBasicSocket = rb_define_class("BasicSocket", rb_cIO);