mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e6ab550ac5
commit
46c4975d9c
21 changed files with 106 additions and 102 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Tue Jun 2 16:00:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* ext/socket/socket.c (udp_addrsetup): error check enhanced.
|
||||||
|
|
||||||
|
* ext/socket/socket.c (sock_s_getservbyaname): use strtoul(), if
|
||||||
|
possible.
|
||||||
|
|
||||||
Sat May 30 07:10:02 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
|
Sat May 30 07:10:02 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
* re.c (reg_prepare_re): no more needless regular expression
|
* re.c (reg_prepare_re): no more needless regular expression
|
||||||
|
|
2
array.c
2
array.c
|
@ -1294,8 +1294,6 @@ ary_flatten(ary)
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE mEnumerable;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_Array()
|
Init_Array()
|
||||||
{
|
{
|
||||||
|
|
1
bignum.c
1
bignum.c
|
@ -12,7 +12,6 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
extern VALUE cInteger;
|
|
||||||
VALUE cBignum;
|
VALUE cBignum;
|
||||||
typedef unsigned short USHORT;
|
typedef unsigned short USHORT;
|
||||||
|
|
||||||
|
|
5
class.c
5
class.c
|
@ -21,9 +21,6 @@
|
||||||
|
|
||||||
extern st_table *rb_class_tbl;
|
extern st_table *rb_class_tbl;
|
||||||
|
|
||||||
extern VALUE cClass;
|
|
||||||
extern VALUE cModule;
|
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
class_new(super)
|
class_new(super)
|
||||||
VALUE super;
|
VALUE super;
|
||||||
|
@ -537,8 +534,6 @@ rb_define_module_function(module, name, func, argc)
|
||||||
rb_define_singleton_method(module, name, func, argc);
|
rb_define_singleton_method(module, name, func, argc);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE mKernel;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
rb_define_global_function(name, func, argc)
|
rb_define_global_function(name, func, argc)
|
||||||
char *name;
|
char *name;
|
||||||
|
|
1
error.c
1
error.c
|
@ -219,7 +219,6 @@ rb_check_type(x, t)
|
||||||
/* exception classes */
|
/* exception classes */
|
||||||
#include "errno.h"
|
#include "errno.h"
|
||||||
|
|
||||||
extern VALUE cString;
|
|
||||||
VALUE eException;
|
VALUE eException;
|
||||||
VALUE eSystemExit, eInterrupt, eFatal;
|
VALUE eSystemExit, eInterrupt, eFatal;
|
||||||
VALUE eStandardError;
|
VALUE eStandardError;
|
||||||
|
|
10
eval.c
10
eval.c
|
@ -364,18 +364,8 @@ extern NODE *eval_tree0;
|
||||||
extern NODE *eval_tree;
|
extern NODE *eval_tree;
|
||||||
extern int nerrs;
|
extern int nerrs;
|
||||||
|
|
||||||
extern VALUE mKernel;
|
|
||||||
extern VALUE cModule;
|
|
||||||
extern VALUE eFatal;
|
|
||||||
extern VALUE eStandardError;
|
|
||||||
extern VALUE eInterrupt;
|
|
||||||
extern VALUE eSystemExit;
|
|
||||||
extern VALUE eException;
|
|
||||||
extern VALUE eRuntimeError;
|
|
||||||
extern VALUE eSyntaxError;
|
|
||||||
static VALUE eLocalJumpError;
|
static VALUE eLocalJumpError;
|
||||||
static VALUE eSysStackError;
|
static VALUE eSysStackError;
|
||||||
extern VALUE eSecurityError;
|
|
||||||
|
|
||||||
extern VALUE TopSelf;
|
extern VALUE TopSelf;
|
||||||
|
|
||||||
|
|
|
@ -135,8 +135,7 @@ bsock_shutdown(argc, argv, sock)
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
bsock_setsockopt(sock, lev, optname, val)
|
bsock_setsockopt(sock, lev, optname, val)
|
||||||
VALUE sock, lev, optname;
|
VALUE sock, lev, optname, val;
|
||||||
struct RString *val;
|
|
||||||
{
|
{
|
||||||
int level, option;
|
int level, option;
|
||||||
OpenFile *fptr;
|
OpenFile *fptr;
|
||||||
|
@ -160,8 +159,7 @@ bsock_setsockopt(sock, lev, optname, val)
|
||||||
v = (char*)&i; vlen = sizeof(i);
|
v = (char*)&i; vlen = sizeof(i);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Check_Type(val, T_STRING);
|
v = str2cstr(val, &vlen);
|
||||||
v = val->ptr; vlen = val->len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GetOpenFile(sock, fptr);
|
GetOpenFile(sock, fptr);
|
||||||
|
@ -229,17 +227,17 @@ bsock_send(argc, argv, sock)
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
VALUE sock;
|
VALUE sock;
|
||||||
{
|
{
|
||||||
struct RString *msg, *to;
|
VALUE msg, to;
|
||||||
VALUE flags;
|
VALUE flags;
|
||||||
OpenFile *fptr;
|
OpenFile *fptr;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int fd, n;
|
int fd, n;
|
||||||
|
char *m, *t;
|
||||||
|
int mlen, tlen;
|
||||||
|
|
||||||
rb_secure(4);
|
rb_secure(4);
|
||||||
rb_scan_args(argc, argv, "21", &msg, &flags, &to);
|
rb_scan_args(argc, argv, "21", &msg, &flags, &to);
|
||||||
|
|
||||||
Check_Type(msg, T_STRING);
|
|
||||||
|
|
||||||
GetOpenFile(sock, fptr);
|
GetOpenFile(sock, fptr);
|
||||||
f = fptr->f2?fptr->f2:fptr->f;
|
f = fptr->f2?fptr->f2:fptr->f;
|
||||||
fd = fileno(f);
|
fd = fileno(f);
|
||||||
|
@ -247,13 +245,14 @@ bsock_send(argc, argv, sock)
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
thread_fd_writable(fd);
|
thread_fd_writable(fd);
|
||||||
#endif
|
#endif
|
||||||
|
m = str2cstr(msg, &mlen);
|
||||||
if (RTEST(to)) {
|
if (RTEST(to)) {
|
||||||
Check_Type(to, T_STRING);
|
t = str2cstr(to, &tlen);
|
||||||
n = sendto(fd, msg->ptr, msg->len, NUM2INT(flags),
|
n = sendto(fd, m, mlen, NUM2INT(flags),
|
||||||
(struct sockaddr*)to->ptr, to->len);
|
(struct sockaddr*)t, tlen);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
n = send(fd, msg->ptr, msg->len, NUM2INT(flags));
|
n = send(fd, m, mlen, NUM2INT(flags));
|
||||||
}
|
}
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
|
@ -491,12 +490,14 @@ open_inet(class, h, serv, type)
|
||||||
servport = FIX2UINT(serv);
|
servport = FIX2UINT(serv);
|
||||||
goto setup_servent;
|
goto setup_servent;
|
||||||
}
|
}
|
||||||
Check_Type(serv, T_STRING);
|
servent = getservbyname(STR2CSTR(serv), "tcp");
|
||||||
servent = getservbyname(RSTRING(serv)->ptr, "tcp");
|
|
||||||
if (servent == NULL) {
|
if (servent == NULL) {
|
||||||
servport = strtoul(RSTRING(serv)->ptr, 0, 0);
|
char *s = STR2CSTR(serv);
|
||||||
if (servport == -1) {
|
char *end;
|
||||||
Raise(eSocket, "no such servce %s", RSTRING(serv)->ptr);
|
|
||||||
|
servport = strtoul(s, &end, 0);
|
||||||
|
if (*end != '\0') {
|
||||||
|
Raise(eSocket, "no such servce %s", s);
|
||||||
}
|
}
|
||||||
setup_servent:
|
setup_servent:
|
||||||
_servent.s_port = htons(servport);
|
_servent.s_port = htons(servport);
|
||||||
|
@ -814,8 +815,7 @@ ip_s_getaddress(obj, host)
|
||||||
addr.sin_addr.s_addr = htonl(i);
|
addr.sin_addr.s_addr = htonl(i);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Check_Type(host, T_STRING);
|
setipaddr(STR2CSTR(host), &addr);
|
||||||
setipaddr(RSTRING(host)->ptr, &addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return mkipaddr(addr.sin_addr.s_addr);
|
return mkipaddr(addr.sin_addr.s_addr);
|
||||||
|
@ -845,8 +845,7 @@ udp_addrsetup(host, port, addr)
|
||||||
addr->sin_addr.s_addr = htonl(i);
|
addr->sin_addr.s_addr = htonl(i);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Check_Type(host, T_STRING);
|
setipaddr(STR2CSTR(host), addr);
|
||||||
setipaddr(RSTRING(host)->ptr, addr);
|
|
||||||
}
|
}
|
||||||
if (FIXNUM_P(port)) {
|
if (FIXNUM_P(port)) {
|
||||||
addr->sin_port = htons(FIX2INT(port));
|
addr->sin_port = htons(FIX2INT(port));
|
||||||
|
@ -854,16 +853,18 @@ udp_addrsetup(host, port, addr)
|
||||||
else {
|
else {
|
||||||
struct servent *servent;
|
struct servent *servent;
|
||||||
|
|
||||||
Check_Type(port, T_STRING);
|
servent = getservbyname(STR2CSTR(port), "udp");
|
||||||
servent = getservbyname(RSTRING(port)->ptr, "udp");
|
|
||||||
if (servent) {
|
if (servent) {
|
||||||
addr->sin_port = servent->s_port;
|
addr->sin_port = servent->s_port;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int port = strtoul(RSTRING(port)->ptr, 0, 0);
|
char *s = STR2CSTR(port);
|
||||||
|
char *end;
|
||||||
|
int portno;
|
||||||
|
|
||||||
if (port == -1) {
|
portno = strtoul(s, &end, 0);
|
||||||
Raise(eSocket, "no such servce %s", RSTRING(port)->ptr);
|
if (*end != '\0') {
|
||||||
|
Raise(eSocket, "no such servce %s", s);
|
||||||
}
|
}
|
||||||
addr->sin_port = htons(port);
|
addr->sin_port = htons(port);
|
||||||
}
|
}
|
||||||
|
@ -924,19 +925,21 @@ udp_send(argc, argv, sock)
|
||||||
OpenFile *fptr;
|
OpenFile *fptr;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int n;
|
int n;
|
||||||
|
char *m;
|
||||||
|
int mlen;
|
||||||
|
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
return bsock_send(argc, argv, sock);
|
return bsock_send(argc, argv, sock);
|
||||||
}
|
}
|
||||||
rb_scan_args(argc, argv, "4", &mesg, &flags, &host, &port);
|
rb_scan_args(argc, argv, "4", &mesg, &flags, &host, &port);
|
||||||
Check_Type(mesg, T_STRING);
|
|
||||||
|
|
||||||
udp_addrsetup(host, port, &addr);
|
udp_addrsetup(host, port, &addr);
|
||||||
GetOpenFile(sock, fptr);
|
GetOpenFile(sock, fptr);
|
||||||
f = fptr->f2?fptr->f2:fptr->f;
|
f = fptr->f2?fptr->f2:fptr->f;
|
||||||
|
m = str2cstr(mesg, &mlen);
|
||||||
retry:
|
retry:
|
||||||
n = sendto(fileno(f), RSTRING(mesg)->ptr, RSTRING(mesg)->len,
|
n = sendto(fileno(f), m, mlen, NUM2INT(flags),
|
||||||
NUM2INT(flags), (struct sockaddr*)&addr, sizeof(addr));
|
(struct sockaddr*)&addr, sizeof(addr));
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
case EINTR:
|
case EINTR:
|
||||||
|
@ -1347,8 +1350,7 @@ sock_s_gethostbyname(obj, host)
|
||||||
addr.sin_addr.s_addr = htonl(i);
|
addr.sin_addr.s_addr = htonl(i);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Check_Type(host, T_STRING);
|
setipaddr(STR2CSTR(host), &addr);
|
||||||
setipaddr(RSTRING(host)->ptr, &addr);
|
|
||||||
}
|
}
|
||||||
h = gethostbyaddr((char *)&addr.sin_addr,
|
h = gethostbyaddr((char *)&addr.sin_addr,
|
||||||
sizeof(addr.sin_addr),
|
sizeof(addr.sin_addr),
|
||||||
|
@ -1364,12 +1366,12 @@ sock_s_gethostbyaddr(argc, argv)
|
||||||
{
|
{
|
||||||
VALUE vaddr, vtype;
|
VALUE vaddr, vtype;
|
||||||
int type;
|
int type;
|
||||||
|
char *addr;
|
||||||
struct sockaddr_in *addr;
|
int alen;
|
||||||
struct hostent *h;
|
struct hostent *h;
|
||||||
|
|
||||||
rb_scan_args(argc, argv, "11", &addr, &vtype);
|
rb_scan_args(argc, argv, "11", &addr, &vtype);
|
||||||
Check_Type(addr, T_STRING);
|
addr = str2cstr(vaddr, &alen);
|
||||||
if (!NIL_P(vtype)) {
|
if (!NIL_P(vtype)) {
|
||||||
type = NUM2INT(vtype);
|
type = NUM2INT(vtype);
|
||||||
}
|
}
|
||||||
|
@ -1377,7 +1379,7 @@ sock_s_gethostbyaddr(argc, argv)
|
||||||
type = AF_INET;
|
type = AF_INET;
|
||||||
}
|
}
|
||||||
|
|
||||||
h = gethostbyaddr(RSTRING(addr)->ptr, RSTRING(addr)->len, type);
|
h = gethostbyaddr(addr, alen, type);
|
||||||
|
|
||||||
return mkhostent(h);
|
return mkhostent(h);
|
||||||
}
|
}
|
||||||
|
@ -1393,15 +1395,22 @@ sock_s_getservbyaname(argc, argv)
|
||||||
int port;
|
int port;
|
||||||
|
|
||||||
rb_scan_args(argc, argv, "11", &service, &protocol);
|
rb_scan_args(argc, argv, "11", &service, &protocol);
|
||||||
Check_Type(service, T_STRING);
|
|
||||||
if (NIL_P(protocol)) proto = "tcp";
|
if (NIL_P(protocol)) proto = "tcp";
|
||||||
else proto = RSTRING(protocol)->ptr;
|
else proto = STR2CSTR(protocol);
|
||||||
|
|
||||||
sp = getservbyname(RSTRING(service)->ptr, proto);
|
sp = getservbyname(STR2CSTR(service), proto);
|
||||||
if (!sp) {
|
if (sp) {
|
||||||
Raise(eSocket, "service/proto not found");
|
port = ntohs(sp->s_port);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
char *s = STR2CSTR(service);
|
||||||
|
char *end;
|
||||||
|
|
||||||
|
port = strtoul(s, &end, 0);
|
||||||
|
if (*end != '\0') {
|
||||||
|
Raise(eSocket, "no such servce %s/%s", s, proto);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
port = ntohs(sp->s_port);
|
|
||||||
|
|
||||||
return INT2FIX(port);
|
return INT2FIX(port);
|
||||||
}
|
}
|
||||||
|
|
3
file.c
3
file.c
|
@ -55,7 +55,6 @@ char *strrchr _((char*,char));
|
||||||
extern int utimes();
|
extern int utimes();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern VALUE cIO;
|
|
||||||
VALUE cFile;
|
VALUE cFile;
|
||||||
VALUE mFileTest;
|
VALUE mFileTest;
|
||||||
static VALUE sStat;
|
static VALUE sStat;
|
||||||
|
@ -1574,8 +1573,6 @@ f_test(argc, argv)
|
||||||
return Qnil; /* not reached */
|
return Qnil; /* not reached */
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE mKernel;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_File()
|
Init_File()
|
||||||
{
|
{
|
||||||
|
|
2
gc.c
2
gc.c
|
@ -1047,8 +1047,6 @@ id2ref(obj, id)
|
||||||
return (VALUE)ptr;
|
return (VALUE)ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE cModule;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_GC()
|
Init_GC()
|
||||||
{
|
{
|
||||||
|
|
5
io.c
5
io.c
|
@ -65,7 +65,6 @@ struct timeval {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VALUE cIO;
|
VALUE cIO;
|
||||||
extern VALUE cFile;
|
|
||||||
VALUE eEOFError;
|
VALUE eEOFError;
|
||||||
VALUE eIOError;
|
VALUE eIOError;
|
||||||
|
|
||||||
|
@ -2559,10 +2558,6 @@ opt_i_set(val)
|
||||||
inplace = RSTRING(val)->ptr;
|
inplace = RSTRING(val)->ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE mKernel;
|
|
||||||
extern VALUE mEnumerable;
|
|
||||||
extern VALUE eStandardError;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_IO()
|
Init_IO()
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,11 +38,6 @@
|
||||||
|
|
||||||
#define TYPE_LINK '@'
|
#define TYPE_LINK '@'
|
||||||
|
|
||||||
extern VALUE cString;
|
|
||||||
extern VALUE cRegexp;
|
|
||||||
extern VALUE cArray;
|
|
||||||
extern VALUE cHash;
|
|
||||||
|
|
||||||
VALUE rb_path2class _((char*));
|
VALUE rb_path2class _((char*));
|
||||||
|
|
||||||
static ID s_dump, s_load;
|
static ID s_dump, s_load;
|
||||||
|
@ -168,7 +163,6 @@ w_unique(s, arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void w_object _((VALUE,struct dump_arg*,int));
|
static void w_object _((VALUE,struct dump_arg*,int));
|
||||||
extern VALUE cIO, cBignum, cStruct;
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hash_each(key, value, arg)
|
hash_each(key, value, arg)
|
||||||
|
|
|
@ -1303,9 +1303,6 @@ fix_zero_p(num)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE mComparable;
|
|
||||||
extern VALUE eStandardError;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_Numeric()
|
Init_Numeric()
|
||||||
{
|
{
|
||||||
|
|
1
object.c
1
object.c
|
@ -22,7 +22,6 @@ VALUE cObject;
|
||||||
#endif
|
#endif
|
||||||
VALUE cModule;
|
VALUE cModule;
|
||||||
VALUE cClass;
|
VALUE cClass;
|
||||||
extern VALUE cFixnum;
|
|
||||||
VALUE cData;
|
VALUE cData;
|
||||||
|
|
||||||
static VALUE cNilClass;
|
static VALUE cNilClass;
|
||||||
|
|
2
pack.c
2
pack.c
|
@ -74,8 +74,6 @@ endian()
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern VALUE cString, cArray;
|
|
||||||
|
|
||||||
static char *toofew = "too few arguments";
|
static char *toofew = "too few arguments";
|
||||||
|
|
||||||
static void encodes _((VALUE,char*,int,int));
|
static void encodes _((VALUE,char*,int,int));
|
||||||
|
|
4
range.c
4
range.c
|
@ -13,8 +13,6 @@
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
|
|
||||||
static VALUE cRange;
|
static VALUE cRange;
|
||||||
extern VALUE cNumeric;
|
|
||||||
|
|
||||||
static ID upto;
|
static ID upto;
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
@ -203,8 +201,6 @@ range_length(rng)
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE mEnumerable;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_Range()
|
Init_Range()
|
||||||
{
|
{
|
||||||
|
|
4
re.c
4
re.c
|
@ -437,7 +437,7 @@ reg_search(reg, str, start, reverse)
|
||||||
start, range, regs);
|
start, range, regs);
|
||||||
kcode_reset_option();
|
kcode_reset_option();
|
||||||
|
|
||||||
if (start == -2) {
|
if (result == -2) {
|
||||||
reg_raise(RREGEXP(reg)->str, RREGEXP(reg)->len,
|
reg_raise(RREGEXP(reg)->str, RREGEXP(reg)->len,
|
||||||
"Stack overfow in regexp matcher", reg);
|
"Stack overfow in regexp matcher", reg);
|
||||||
}
|
}
|
||||||
|
@ -1010,8 +1010,6 @@ match_setter(val)
|
||||||
backref_set(val);
|
backref_set(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE eStandardError;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_Regexp()
|
Init_Regexp()
|
||||||
{
|
{
|
||||||
|
|
55
ruby.h
55
ruby.h
|
@ -147,12 +147,6 @@ VALUE int2inum _((long));
|
||||||
# define RTEST(v) rb_test_false_or_nil((VALUE)(v))
|
# define RTEST(v) rb_test_false_or_nil((VALUE)(v))
|
||||||
#define NIL_P(v) ((VALUE)(v) == Qnil)
|
#define NIL_P(v) ((VALUE)(v) == Qnil)
|
||||||
|
|
||||||
#ifdef __MACOS__ /* name conflict, AERegistory.h */
|
|
||||||
extern VALUE cRubyObject;
|
|
||||||
#else
|
|
||||||
extern VALUE cObject;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VALUE rb_class_of _((VALUE));
|
VALUE rb_class_of _((VALUE));
|
||||||
#define CLASS_OF(v) rb_class_of((VALUE)(v))
|
#define CLASS_OF(v) rb_class_of((VALUE)(v))
|
||||||
|
|
||||||
|
@ -492,6 +486,55 @@ VALUE rb_iterate _((VALUE(*)(),VALUE,VALUE(*)(),VALUE));
|
||||||
VALUE rb_rescue _((VALUE(*)(),VALUE,VALUE(*)(),VALUE));
|
VALUE rb_rescue _((VALUE(*)(),VALUE,VALUE(*)(),VALUE));
|
||||||
VALUE rb_ensure _((VALUE(*)(),VALUE,VALUE(*)(),VALUE));
|
VALUE rb_ensure _((VALUE(*)(),VALUE,VALUE(*)(),VALUE));
|
||||||
|
|
||||||
|
extern VALUE mKernel;
|
||||||
|
extern VALUE mComparable;
|
||||||
|
extern VALUE mEnumerable;
|
||||||
|
extern VALUE mErrno;
|
||||||
|
extern VALUE mFileTest;
|
||||||
|
extern VALUE mGC;
|
||||||
|
extern VALUE mMath;
|
||||||
|
extern VALUE mProcess;
|
||||||
|
|
||||||
|
#ifdef __MACOS__ /* name conflict, AERegistory.h */
|
||||||
|
extern VALUE cRubyObject;
|
||||||
|
#else
|
||||||
|
extern VALUE cObject;
|
||||||
|
#endif
|
||||||
|
extern VALUE cArray;
|
||||||
|
extern VALUE cBignum;
|
||||||
|
extern VALUE cClass;
|
||||||
|
extern VALUE cData;
|
||||||
|
extern VALUE cFile;
|
||||||
|
extern VALUE cFixnum;
|
||||||
|
extern VALUE cFloat;
|
||||||
|
extern VALUE cHash;
|
||||||
|
extern VALUE cInteger;
|
||||||
|
extern VALUE cIO;
|
||||||
|
extern VALUE cModule;
|
||||||
|
extern VALUE cNumeric;
|
||||||
|
extern VALUE cProc;
|
||||||
|
extern VALUE cRegexp;
|
||||||
|
extern VALUE cString;
|
||||||
|
extern VALUE cThread;
|
||||||
|
extern VALUE cStruct;
|
||||||
|
|
||||||
|
extern VALUE eException;
|
||||||
|
extern VALUE eStandardError;
|
||||||
|
extern VALUE eSystemExit, eInterrupt, eFatal;
|
||||||
|
extern VALUE eArgError;
|
||||||
|
extern VALUE eEOFError;
|
||||||
|
extern VALUE eIndexError;
|
||||||
|
extern VALUE eIOError;
|
||||||
|
extern VALUE eLoadError;
|
||||||
|
extern VALUE eNameError;
|
||||||
|
extern VALUE eRuntimeError;
|
||||||
|
extern VALUE eSecurityError;
|
||||||
|
extern VALUE eSyntaxError;
|
||||||
|
extern VALUE eSystemCallError;
|
||||||
|
extern VALUE eTypeError;
|
||||||
|
extern VALUE eZeroDiv;
|
||||||
|
extern VALUE eNotImpError;
|
||||||
|
|
||||||
#include "intern.h"
|
#include "intern.h"
|
||||||
|
|
||||||
#if defined(EXTLIB) && defined(USE_DLN_A_OUT)
|
#if defined(EXTLIB) && defined(USE_DLN_A_OUT)
|
||||||
|
|
4
string.c
4
string.c
|
@ -2607,10 +2607,6 @@ str_center(str, w)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VALUE mKernel;
|
|
||||||
extern VALUE mComparable;
|
|
||||||
extern VALUE mEnumerable;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_String()
|
Init_String()
|
||||||
{
|
{
|
||||||
|
|
1
struct.c
1
struct.c
|
@ -15,7 +15,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VALUE cStruct;
|
VALUE cStruct;
|
||||||
extern VALUE mEnumerable;
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
class_of(obj)
|
class_of(obj)
|
||||||
|
|
1
time.c
1
time.c
|
@ -39,7 +39,6 @@ static VALUE cTime;
|
||||||
#if defined(HAVE_TIMES) || defined(NT)
|
#if defined(HAVE_TIMES) || defined(NT)
|
||||||
static VALUE S_Tms;
|
static VALUE S_Tms;
|
||||||
#endif
|
#endif
|
||||||
extern VALUE mComparable;
|
|
||||||
|
|
||||||
struct time_object {
|
struct time_object {
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
|
@ -43,8 +43,6 @@ struct fc_result {
|
||||||
struct fc_result *prev;
|
struct fc_result *prev;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern VALUE cModule;
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fc_i(key, value, res)
|
fc_i(key, value, res)
|
||||||
ID key;
|
ID key;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue