mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.h (RSTRING_*, RARRAY_*, RREGEXP_*, RSTRUCT_*, RBIGNUM_*):
ensure non-lvalue for compatibility with 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c50494d6bb
commit
0eb42786ea
3 changed files with 19 additions and 14 deletions
|
|
@ -1,3 +1,8 @@
|
|||
Fri Mar 19 17:12:34 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.h (RSTRING_*, RARRAY_*, RREGEXP_*, RSTRUCT_*, RBIGNUM_*):
|
||||
ensure non-lvalue for compatibility with 1.9.
|
||||
|
||||
Thu Mar 18 13:51:22 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* io.c, eval.c, process.c: add linux to r26371's condition.
|
||||
|
|
|
|||
22
ruby.h
22
ruby.h
|
|
@ -364,8 +364,8 @@ struct RString {
|
|||
VALUE shared;
|
||||
} aux;
|
||||
};
|
||||
#define RSTRING_PTR(s) (RSTRING(s)->ptr)
|
||||
#define RSTRING_LEN(s) (RSTRING(s)->len)
|
||||
#define RSTRING_PTR(s) (*(char *const *)&RSTRING(s)->ptr)
|
||||
#define RSTRING_LEN(s) (*(const long *)&RSTRING(s)->len)
|
||||
#define RSTRING_END(s) (RSTRING_PTR(s)+RSTRING_LEN(s))
|
||||
|
||||
struct RArray {
|
||||
|
|
@ -377,8 +377,8 @@ struct RArray {
|
|||
} aux;
|
||||
VALUE *ptr;
|
||||
};
|
||||
#define RARRAY_PTR(s) (RARRAY(s)->ptr)
|
||||
#define RARRAY_LEN(s) (RARRAY(s)->len)
|
||||
#define RARRAY_PTR(s) (*(VALUE *const *)&RARRAY(s)->ptr)
|
||||
#define RARRAY_LEN(s) (*(const long *)&RARRAY(s)->len)
|
||||
|
||||
struct RRegexp {
|
||||
struct RBasic basic;
|
||||
|
|
@ -386,8 +386,8 @@ struct RRegexp {
|
|||
long len;
|
||||
char *str;
|
||||
};
|
||||
#define RREGEXP_SRC_PTR(r) (RREGEXP(r)->src)
|
||||
#define RREGEXP_SRC_LEN(r) (RREGEXP(r)->len)
|
||||
#define RREGEXP_SRC_PTR(r) (*(char *const *)&RREGEXP(r)->src)
|
||||
#define RREGEXP_SRC_LEN(r) (*(const long *)&RREGEXP(r)->len)
|
||||
|
||||
struct RHash {
|
||||
struct RBasic basic;
|
||||
|
|
@ -441,8 +441,8 @@ struct RStruct {
|
|||
long len;
|
||||
VALUE *ptr;
|
||||
};
|
||||
#define RSTRUCT_LEN(st) (RSTRUCT(st)->len)
|
||||
#define RSTRUCT_PTR(st) (RSTRUCT(st)->ptr)
|
||||
#define RSTRUCT_LEN(st) (*(const long *)&RSTRUCT(st)->len)
|
||||
#define RSTRUCT_PTR(st) (*(VALUE *const *)&RSTRUCT(st)->ptr)
|
||||
|
||||
struct RBignum {
|
||||
struct RBasic basic;
|
||||
|
|
@ -450,12 +450,12 @@ struct RBignum {
|
|||
long len;
|
||||
void *digits;
|
||||
};
|
||||
#define RBIGNUM_SIGN(b) (RBIGNUM(b)->sign)
|
||||
#define RBIGNUM_SIGN(b) (RBIGNUM(b)->sign != 0)
|
||||
#define RBIGNUM_SET_SIGN(b,s) (RBIGNUM(b)->sign = (s))
|
||||
#define RBIGNUM_POSITIVE_P(b) RBIGNUM_SIGN(b)
|
||||
#define RBIGNUM_NEGATIVE_P(b) (!RBIGNUM_SIGN(b))
|
||||
#define RBIGNUM_LEN(b) (RBIGNUM(b)->len)
|
||||
#define RBIGNUM_DIGITS(b) (RBIGNUM(b)->digits)
|
||||
#define RBIGNUM_LEN(b) (*(const long *)&RBIGNUM(b)->len)
|
||||
#define RBIGNUM_DIGITS(b) (*(VALUE *const *)&RBIGNUM(b)->digits)
|
||||
|
||||
#define R_CAST(st) (struct st*)
|
||||
#define RBASIC(obj) (R_CAST(RBasic)(obj))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.8.8"
|
||||
#define RUBY_RELEASE_DATE "2010-03-18"
|
||||
#define RUBY_RELEASE_DATE "2010-03-19"
|
||||
#define RUBY_VERSION_CODE 188
|
||||
#define RUBY_RELEASE_CODE 20100318
|
||||
#define RUBY_RELEASE_CODE 20100319
|
||||
#define RUBY_PATCHLEVEL -1
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 8
|
||||
#define RUBY_RELEASE_YEAR 2010
|
||||
#define RUBY_RELEASE_MONTH 3
|
||||
#define RUBY_RELEASE_DAY 18
|
||||
#define RUBY_RELEASE_DAY 19
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue