diff options
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/defines.h | 2 | ||||
-rw-r--r-- | include/ruby/encoding.h | 10 | ||||
-rw-r--r-- | include/ruby/oniguruma.h | 20 | ||||
-rw-r--r-- | include/ruby/ruby.h | 5 |
4 files changed, 19 insertions, 18 deletions
diff --git a/include/ruby/defines.h b/include/ruby/defines.h index 1a0274ec81..d580135233 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -198,7 +198,7 @@ void xfree(void*); #include "vms/vms.h" #endif -#if defined(__BEOS__) && !defined(__HAIKU__) +#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) #include <net/socket.h> /* intern.h needs fd_set definition */ #endif diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index a69940e267..f2f7ba19b5 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -129,11 +129,11 @@ int rb_enc_codelen(int code, rb_encoding *enc); /* code,ptr,encoding -> write buf */ #define rb_enc_mbcput(c,buf,enc) ONIGENC_CODE_TO_MBC(enc,c,(UChar*)(buf)) -/* ptr, ptr, encoding -> prev_char */ -#define rb_enc_prev_char(s,p,enc) (char *)onigenc_get_prev_char_head(enc,(UChar*)(s),(UChar*)(p)) -/* ptr, ptr, encoding -> next_char */ -#define rb_enc_left_char_head(s,p,enc) (char *)onigenc_get_left_adjust_char_head(enc,(UChar*)(s),(UChar*)(p)) -#define rb_enc_right_char_head(s,p,enc) (char *)onigenc_get_right_adjust_char_head(enc,(UChar*)(s),(UChar*)(p)) +/* start, ptr, end, encoding -> prev_char */ +#define rb_enc_prev_char(s,p,e,enc) (char *)onigenc_get_prev_char_head(enc,(UChar*)(s),(UChar*)(p),(UChar*)(e)) +/* start, ptr, end, encoding -> next_char */ +#define rb_enc_left_char_head(s,p,e,enc) (char *)onigenc_get_left_adjust_char_head(enc,(UChar*)(s),(UChar*)(p),(UChar*)(e)) +#define rb_enc_right_char_head(s,p,e,enc) (char *)onigenc_get_right_adjust_char_head(enc,(UChar*)(s),(UChar*)(p),(UChar*)(e)) /* ptr, ptr, encoding -> newline_or_not */ #define rb_enc_is_newline(p,end,enc) ONIGENC_IS_MBC_NEWLINE(enc,(UChar*)(p),(UChar*)(end)) diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h index 2e3b2bf293..bc6905edaa 100644 --- a/include/ruby/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -164,7 +164,7 @@ typedef struct OnigEncodingTypeST { int (*property_name_to_ctype)(struct OnigEncodingTypeST* enc, OnigUChar* p, OnigUChar* end); int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype, struct OnigEncodingTypeST* enc); int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], struct OnigEncodingTypeST* enc); - OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, struct OnigEncodingTypeST* enc); + OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, const OnigUChar* end, struct OnigEncodingTypeST* enc); int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end, struct OnigEncodingTypeST* enc); int ruby_encoding_index; } OnigEncodingType; @@ -219,14 +219,14 @@ ONIG_EXTERN OnigEncodingType OnigEncodingASCII; (enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf,enc) #define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \ (enc)->is_allowed_reverse_match(s,end,enc) -#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s) \ - (enc)->left_adjust_char_head(start, s, enc) +#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s,end) \ + (enc)->left_adjust_char_head(start, s, end, enc) #define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) \ (enc)->apply_all_case_fold(case_fold_flag,f,arg,enc) #define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) \ (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc) -#define ONIGENC_STEP_BACK(enc,start,s,n) \ - onigenc_step_back((enc),(start),(s),(n)) +#define ONIGENC_STEP_BACK(enc,start,s,end,n) \ + onigenc_step_back((enc),(start),(s),(end),(n)) #define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) (n) #define ONIGENC_MBCLEN_CHARFOUND_P(r) (0 < (r)) @@ -290,7 +290,7 @@ int onigenc_mbclen_approximate P_((const OnigUChar* p,const OnigUChar* e, struct (enc)->get_ctype_code_range(ctype,sbout,ranges,enc) ONIG_EXTERN -OnigUChar* onigenc_step_back P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, int n)); +OnigUChar* onigenc_step_back P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, int n)); /* encoding API */ @@ -303,13 +303,13 @@ OnigEncoding onigenc_get_default_encoding P_((void)); ONIG_EXTERN void onigenc_set_default_caseconv_table P_((const OnigUChar* table)); ONIG_EXTERN -OnigUChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar** prev)); +OnigUChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, const OnigUChar** prev)); ONIG_EXTERN -OnigUChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s)); +OnigUChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end)); ONIG_EXTERN -OnigUChar* onigenc_get_left_adjust_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s)); +OnigUChar* onigenc_get_left_adjust_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end)); ONIG_EXTERN -OnigUChar* onigenc_get_right_adjust_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s)); +OnigUChar* onigenc_get_right_adjust_char_head P_((OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end)); ONIG_EXTERN int onigenc_strlen P_((OnigEncoding enc, const OnigUChar* p, const OnigUChar* end)); ONIG_EXTERN diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index d8ae11b204..eb80bce4c2 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -650,7 +650,7 @@ struct RRational { struct RComplex { struct RBasic basic; VALUE real; - VALUE image; + VALUE imag; }; struct RData { @@ -851,7 +851,7 @@ void rb_define_alias(VALUE,const char*,const char*); void rb_define_attr(VALUE,const char*,int,int); void rb_global_variable(VALUE*); -void rb_register_mark_object(VALUE); +void rb_gc_register_mark_object(VALUE); void rb_gc_register_address(VALUE*); void rb_gc_unregister_address(VALUE*); @@ -982,6 +982,7 @@ RUBY_EXTERN VALUE rb_cCont; RUBY_EXTERN VALUE rb_cDir; RUBY_EXTERN VALUE rb_cData; RUBY_EXTERN VALUE rb_cFalseClass; +RUBY_EXTERN VALUE rb_cEncoding; RUBY_EXTERN VALUE rb_cEnumerator; RUBY_EXTERN VALUE rb_cFile; RUBY_EXTERN VALUE rb_cFixnum; |