mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c101164b02
commit
a5dcc4437e
18 changed files with 101 additions and 87 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
Tue Dec 26 16:53:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_f_binding): recycling should be stopped for outer
|
||||
scope too.
|
||||
|
||||
* eval.c (proc_new): ditto.
|
||||
|
||||
Mon Dec 25 17:49:08 2000 K.Kosako <kosako@sofnec.co.jp>
|
||||
|
||||
* string.c (rb_str_replace_m): unexpected string share happens if
|
||||
replace is done for associated (STR_NO_ORIG) string.
|
||||
|
||||
Tue Dec 26 15:01:53 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* io.c (rb_f_p): should not call rb_io_flush() if rb_defout is not
|
||||
a IO (T_FILE).
|
||||
|
||||
Mon Dec 25 15:52:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* stable version 1.6.2 released.
|
||||
|
|
27
configure.in
27
configure.in
|
@ -163,6 +163,33 @@ if test "$rb_cv_have_attr_noreturn" = yes; then
|
|||
AC_DEFINE(HAVE_ATTR_NORETURN)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for inline)
|
||||
AC_CACHE_VAL(rb_cv_inline,
|
||||
[AC_TRY_COMPILE([
|
||||
extern __inline__ int foo() {return 0;}
|
||||
static __inline__ char* bar() {return "";}
|
||||
], [], rb_cv_inline="__inline__", )
|
||||
if test "$rb_cv_inline" = ""; then
|
||||
AC_TRY_COMPILE([
|
||||
extern __inline int foo() {return 0;}
|
||||
static __inline char bar() {return "";}
|
||||
], [], rb_cv_inline="__inline", )
|
||||
fi
|
||||
if test "$rb_cv_inline" = ""; then
|
||||
AC_TRY_COMPILE([
|
||||
extern inline int foo() {return 0;}
|
||||
static inline char bar() {return "";}
|
||||
], [], rb_cv_inline="inline", )
|
||||
fi])
|
||||
if test "$rb_cv_inline" = ""; then
|
||||
AC_MSG_RESULT([not work])
|
||||
AC_DEFINE(INLINE, /*inline*/)
|
||||
else
|
||||
AC_MSG_RESULT($rb_cv_inline)
|
||||
AC_DEFINE(HAVE_INLINE)
|
||||
AC_DEFINE_UNQUOTED(INLINE, $rb_cv_inline)
|
||||
fi
|
||||
|
||||
dnl Checks for libraries.
|
||||
case "$target_os" in
|
||||
nextstep*) ;;
|
||||
|
|
10
dln.h
10
dln.h
|
@ -13,13 +13,11 @@
|
|||
#ifndef DLN_H
|
||||
#define DLN_H
|
||||
|
||||
#ifndef _
|
||||
#ifndef __STDC__
|
||||
# define _(args) ()
|
||||
# define const
|
||||
#else
|
||||
#undef _
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
# define _(args) args
|
||||
#endif
|
||||
#else
|
||||
# define _(args) ()
|
||||
#endif
|
||||
|
||||
char *dln_find_exe _((const char*,const char*));
|
||||
|
|
20
eval.c
20
eval.c
|
@ -5980,7 +5980,7 @@ static VALUE
|
|||
rb_f_binding(self)
|
||||
VALUE self;
|
||||
{
|
||||
struct BLOCK *data;
|
||||
struct BLOCK *data, *p;
|
||||
struct RVarmap *vars;
|
||||
VALUE bind;
|
||||
|
||||
|
@ -6003,9 +6003,11 @@ rb_f_binding(self)
|
|||
data->prev = 0;
|
||||
}
|
||||
|
||||
for (vars = data->dyna_vars; vars; vars = vars->next) {
|
||||
if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
|
||||
FL_SET(vars, DVAR_DONT_RECYCLE);
|
||||
for (p = data; p; p = p->prev) {
|
||||
for (vars = p->dyna_vars; vars; vars = vars->next) {
|
||||
if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
|
||||
FL_SET(vars, DVAR_DONT_RECYCLE);
|
||||
}
|
||||
}
|
||||
scope_dup(data->scope);
|
||||
POP_BLOCK();
|
||||
|
@ -6063,7 +6065,7 @@ proc_new(klass)
|
|||
VALUE klass;
|
||||
{
|
||||
volatile VALUE proc;
|
||||
struct BLOCK *data;
|
||||
struct BLOCK *data, *p;
|
||||
struct RVarmap *vars;
|
||||
|
||||
if (!rb_block_given_p() && !rb_f_block_given_p()) {
|
||||
|
@ -6085,9 +6087,11 @@ proc_new(klass)
|
|||
}
|
||||
data->flags |= BLOCK_DYNAMIC;
|
||||
|
||||
for (vars = data->dyna_vars; vars; vars = vars->next) {
|
||||
if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
|
||||
FL_SET(vars, DVAR_DONT_RECYCLE);
|
||||
for (p = data; p; p = p->prev) {
|
||||
for (vars = p->dyna_vars; vars; vars = vars->next) {
|
||||
if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
|
||||
FL_SET(vars, DVAR_DONT_RECYCLE);
|
||||
}
|
||||
}
|
||||
scope_dup(data->scope);
|
||||
proc_save_safe_level(proc);
|
||||
|
|
5
gc.c
5
gc.c
|
@ -308,10 +308,7 @@ rb_data_object_alloc(klass, datap, dmark, dfree)
|
|||
extern st_table *rb_class_tbl;
|
||||
VALUE *rb_gc_stack_start = 0;
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 2
|
||||
__inline__
|
||||
#endif
|
||||
static int
|
||||
static INLINE int
|
||||
is_pointer_to_heap(ptr)
|
||||
void *ptr;
|
||||
{
|
||||
|
|
4
io.c
4
io.c
|
@ -2156,7 +2156,9 @@ rb_f_p(argc, argv)
|
|||
for (i=0; i<argc; i++) {
|
||||
rb_p(argv[i]);
|
||||
}
|
||||
rb_io_flush(rb_defout);
|
||||
if (TYPE(rb_defout) != T_FILE) {
|
||||
rb_io_flush(rb_defout);
|
||||
}
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "rubyio.h"
|
||||
#include "st.h"
|
||||
|
||||
#ifndef atof
|
||||
#if !defined(atof) && !defined(HAVE_STDLIB_H)
|
||||
double strtod();
|
||||
#endif
|
||||
|
||||
|
|
6
pack.c
6
pack.c
|
@ -1026,11 +1026,7 @@ qpencode(str, from, len)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(RUBY_NO_INLINE)
|
||||
static __inline__ int
|
||||
#else
|
||||
static int
|
||||
#endif
|
||||
static INLINE int
|
||||
hex2num(c)
|
||||
char c;
|
||||
{
|
||||
|
|
7
parse.y
7
parse.y
|
@ -2043,10 +2043,7 @@ rb_compile_file(f, file, start)
|
|||
return yycompile(strdup(f), start);
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 2
|
||||
__inline__
|
||||
#endif
|
||||
static int
|
||||
static INLINE int
|
||||
nextc()
|
||||
{
|
||||
int c;
|
||||
|
@ -2794,7 +2791,7 @@ arg_ambiguous()
|
|||
rb_warning("ambiguous first argument; make sure");
|
||||
}
|
||||
|
||||
#ifndef strtod
|
||||
#if !defined(strtod) && !defined(HAVE_STDLIB_H)
|
||||
double strtod ();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -234,7 +234,9 @@ proc_waitpid2(argc, argv)
|
|||
return rb_assoc_new(pid, rb_last_status);
|
||||
}
|
||||
|
||||
#ifndef HAVE_STRING_H
|
||||
char *strtok();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SETITIMER
|
||||
#define before_exec() rb_thread_stop_timer()
|
||||
|
|
28
ruby.h
28
ruby.h
|
@ -541,12 +541,15 @@ EXTERN VALUE rb_eNameError;
|
|||
EXTERN VALUE rb_eSyntaxError;
|
||||
EXTERN VALUE rb_eLoadError;
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(RUBY_NO_INLINE)
|
||||
extern __inline__ VALUE rb_class_of _((VALUE));
|
||||
extern __inline__ int rb_type _((VALUE));
|
||||
extern __inline__ int rb_special_const_p _((VALUE));
|
||||
extern INLINE VALUE rb_class_of _((VALUE));
|
||||
extern INLINE int rb_type _((VALUE));
|
||||
extern INLINE int rb_special_const_p _((VALUE));
|
||||
|
||||
extern __inline__ VALUE
|
||||
#if defined(HAVE_INLINE) || defined(RUBY_NO_INLINE)
|
||||
#ifndef RUBY_NO_INLINE
|
||||
extern
|
||||
#endif
|
||||
INLINE VALUE
|
||||
rb_class_of(VALUE obj)
|
||||
{
|
||||
if (FIXNUM_P(obj)) return rb_cFixnum;
|
||||
|
@ -558,7 +561,10 @@ rb_class_of(VALUE obj)
|
|||
return RBASIC(obj)->klass;
|
||||
}
|
||||
|
||||
extern __inline__ int
|
||||
#ifndef RUBY_NO_INLINE
|
||||
extern
|
||||
#endif
|
||||
INLINE int
|
||||
rb_type(VALUE obj)
|
||||
{
|
||||
if (FIXNUM_P(obj)) return T_FIXNUM;
|
||||
|
@ -570,17 +576,15 @@ rb_type(VALUE obj)
|
|||
return BUILTIN_TYPE(obj);
|
||||
}
|
||||
|
||||
extern __inline__ int
|
||||
#ifndef RUBY_NO_INLINE
|
||||
extern
|
||||
#endif
|
||||
INLINE int
|
||||
rb_special_const_p(VALUE obj)
|
||||
{
|
||||
if (SPECIAL_CONST_P(obj)) return Qtrue;
|
||||
return Qfalse;
|
||||
}
|
||||
|
||||
#else
|
||||
VALUE rb_class_of _((VALUE));
|
||||
int rb_type _((VALUE));
|
||||
int rb_special_const_p _((VALUE));
|
||||
#endif
|
||||
|
||||
#include "intern.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log2(10) =~ 146/485 */
|
||||
|
||||
#ifndef atof
|
||||
#if !defined(atof) && !defined(HAVE_STDLIB_H)
|
||||
double strtod();
|
||||
#endif
|
||||
|
||||
|
|
8
string.c
8
string.c
|
@ -1316,15 +1316,19 @@ static VALUE
|
|||
rb_str_replace_m(str, str2)
|
||||
VALUE str, str2;
|
||||
{
|
||||
if (str == str2) return str;
|
||||
if (TYPE(str2) != T_STRING) str2 = rb_str_to_str(str2);
|
||||
rb_str_modify(str);
|
||||
|
||||
if (RSTRING(str2)->orig && FL_TEST(str2, STR_NO_ORIG)) {
|
||||
if (RSTRING(str2)->orig && !FL_TEST(str2, STR_NO_ORIG)) {
|
||||
if (str_independent(str)) {
|
||||
free(RSTRING(str)->ptr);
|
||||
}
|
||||
RSTRING(str)->len = RSTRING(str2)->len;
|
||||
RSTRING(str)->ptr = RSTRING(str2)->ptr;
|
||||
RSTRING(str)->orig = RSTRING(str2)->orig;
|
||||
}
|
||||
else {
|
||||
rb_str_modify(str);
|
||||
rb_str_resize(str, RSTRING(str2)->len);
|
||||
memcpy(RSTRING(str)->ptr, RSTRING(str2)->ptr, RSTRING(str2)->len);
|
||||
}
|
||||
|
|
36
util.c
36
util.c
|
@ -19,42 +19,6 @@
|
|||
#define RUBY_NO_INLINE
|
||||
#include "ruby.h"
|
||||
|
||||
VALUE
|
||||
rb_class_of(obj)
|
||||
VALUE obj;
|
||||
{
|
||||
if (FIXNUM_P(obj)) return rb_cFixnum;
|
||||
if (obj == Qnil) return rb_cNilClass;
|
||||
if (obj == Qfalse) return rb_cFalseClass;
|
||||
if (obj == Qtrue) return rb_cTrueClass;
|
||||
if (SYMBOL_P(obj)) return rb_cSymbol;
|
||||
|
||||
return RBASIC(obj)->klass;
|
||||
}
|
||||
|
||||
int
|
||||
rb_type(obj)
|
||||
VALUE obj;
|
||||
{
|
||||
if (FIXNUM_P(obj)) return T_FIXNUM;
|
||||
if (obj == Qnil) return T_NIL;
|
||||
if (obj == Qfalse) return T_FALSE;
|
||||
if (obj == Qtrue) return T_TRUE;
|
||||
if (obj == Qundef) return T_UNDEF;
|
||||
if (SYMBOL_P(obj)) return T_SYMBOL;
|
||||
|
||||
return BUILTIN_TYPE(obj);
|
||||
}
|
||||
|
||||
int
|
||||
rb_special_const_p(obj)
|
||||
VALUE obj;
|
||||
{
|
||||
if (SPECIAL_CONST_P(obj)) return Qtrue;
|
||||
|
||||
return Qfalse;
|
||||
}
|
||||
|
||||
#include "util.h"
|
||||
#ifndef HAVE_STRING_H
|
||||
char *strchr _((char*,char));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#define RUBY_VERSION "1.6.2"
|
||||
#define RUBY_RELEASE_DATE "2000-12-25"
|
||||
#define RUBY_VERSION_CODE 162
|
||||
#define RUBY_RELEASE_CODE 20001225
|
||||
#define RUBY_VERSION "1.7.0"
|
||||
#define RUBY_RELEASE_DATE "2000-12-26"
|
||||
#define RUBY_VERSION_CODE 170
|
||||
#define RUBY_RELEASE_CODE 20001226
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define HAVE_PROTOTYPES 1
|
||||
#define HAVE_STDARG_PROTOTYPES 1
|
||||
/* #define HAVE_ATTR_NORETURN 1 */
|
||||
#define HAVE_INLINE 1
|
||||
#define INLINE __inline
|
||||
/* #define HAVE_DIRENT_H 1 */
|
||||
/* #define HAVE_UNISTD_H 1 */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
|
|
@ -4,7 +4,7 @@ s%@CPPFLAGS@%%g
|
|||
s%@CXXFLAGS@%%g
|
||||
s%@FFLAGS@%%g
|
||||
s%@DEFS@%
|
||||
-DUSE_THREAD -DSIZEOF_INT=4 -DSIZEOF_SHORT=2 -DSIZEOF_LONG=4 -DSIZEOF_VOIDP=4 -DSIZEOF_FLOAT=4 -DSIZEOF_DOUBLE=8 -DHAVE_PROTOTYPES=1 -DHAVE_STDARG_PROTOTYPES=1 -DHAVE_STDLIB_H=1 -DHAVE_LIMITS_H=1 -DHAVE_FCNTL_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ST_RDEV=1 -DGETGROUPS_T=int -DRETSIGTYPE=void -DHAVE_ALLOCA=1 -DHAVE_FMOD=1 -DHAVE_WAITPID=1 -DHAVE_GETCWD=1 -DHAVE_CHSIZE=1 -DHAVE_GETGROUPS=1 -DHAVE_GETLOGIN=1 -DRSHIFT=\(x,y\)\ \(\(x\)\>\>y\) -DFILE_COUNT=_cnt -DDLEXT=\".so\" -DDLEXT2=\".dll\" -DRUBY_PLATFORM=\"i586-mswin32\" %g
|
||||
-DUSE_THREAD -DSIZEOF_INT=4 -DSIZEOF_SHORT=2 -DSIZEOF_LONG=4 -DSIZEOF_VOIDP=4 -DSIZEOF_FLOAT=4 -DSIZEOF_DOUBLE=8 -DHAVE_PROTOTYPES=1 -DHAVE_STDARG_PROTOTYPES=1 -DHAVE_INLINE=1 -DINLINE=__inline -DHAVE_STDLIB_H=1 -DHAVE_LIMITS_H=1 -DHAVE_FCNTL_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ST_RDEV=1 -DGETGROUPS_T=int -DRETSIGTYPE=void -DHAVE_ALLOCA=1 -DHAVE_FMOD=1 -DHAVE_WAITPID=1 -DHAVE_GETCWD=1 -DHAVE_CHSIZE=1 -DHAVE_GETGROUPS=1 -DHAVE_GETLOGIN=1 -DRSHIFT=\(x,y\)\ \(\(x\)\>\>y\) -DFILE_COUNT=_cnt -DDLEXT=\".so\" -DDLEXT2=\".dll\" -DRUBY_PLATFORM=\"i586-mswin32\" %g
|
||||
s%@LDFLAGS@%-nologo%g
|
||||
s%@LIBS@%user32.lib advapi32.lib wsock32.lib%g
|
||||
s%@exec_prefix@%${prefix}%g
|
||||
|
|
|
@ -18,7 +18,7 @@ Makefile:
|
|||
@echo ### makefile for ruby $(OS) ###> $@
|
||||
@echo srcdir = $(srcdir:\=/)>> $@
|
||||
@echo RUBY_INSTALL_NAME = ruby>> $@
|
||||
@echo RUBY_SO_NAME = $(OS)-$$(RUBY_INSTALL_NAME)16>> $@
|
||||
@echo RUBY_SO_NAME = $(OS)-$$(RUBY_INSTALL_NAME)17>> $@
|
||||
@echo !INCLUDE $$(srcdir)/win32/Makefile.sub>> $@
|
||||
|
||||
config.h config.status: $(srcdir)/win32/$$@.in
|
||||
|
|
Loading…
Reference in a new issue