From edd7c787adc53f70a9d2790076e4c6d77a1f5324 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 6 Sep 2007 12:33:45 +0000 Subject: * array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui . [ruby-dev:31748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 2 +- include/ruby/oniguruma.h | 8 ++++---- include/ruby/regex.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include/ruby') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index e807e8a547..f43160a682 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -50,7 +50,7 @@ rb_encoding * rb_enc_find(const char *name); #define rb_enc_mbmaxlen(enc) (enc)->max_enc_len /* ptr,encoding -> mbclen */ -int rb_enc_mbclen(const char*, rb_encoding*); +int rb_enc_mbclen(const char*, const char *, rb_encoding*); /* code,encoding -> codelen */ int rb_enc_codelen(int, rb_encoding*); diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h index d0d04782e4..a75f811ff8 100644 --- a/include/ruby/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -144,7 +144,7 @@ typedef struct { typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg); typedef struct OnigEncodingTypeST { - int (*mbc_enc_len)(const OnigUChar* p); + int (*mbc_enc_len)(const OnigUChar* p,const OnigUChar* e); const char* name; int max_enc_len; int min_enc_len; @@ -255,11 +255,11 @@ ONIG_EXTERN OnigEncodingType OnigEncodingGB18030; #define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII -#define enc_len(enc,p) ONIGENC_MBC_ENC_LEN(enc, p) +#define enc_len(enc,p,e) ONIGENC_MBC_ENC_LEN(enc, p, e) #define ONIGENC_IS_UNDEF(enc) ((enc) == ONIG_ENCODING_UNDEF) #define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) == 1) -#define ONIGENC_IS_MBC_HEAD(enc,p) (ONIGENC_MBC_ENC_LEN(enc,p) != 1) +#define ONIGENC_IS_MBC_HEAD(enc,p,e) (ONIGENC_MBC_ENC_LEN(enc,p,e) != 1) #define ONIGENC_IS_MBC_ASCII(p) (*(p) < 128) #define ONIGENC_IS_CODE_ASCII(code) ((code) < 128) #define ONIGENC_IS_MBC_WORD(enc,s,end) \ @@ -281,7 +281,7 @@ ONIG_EXTERN OnigEncodingType OnigEncodingGB18030; #define ONIGENC_STEP_BACK(enc,start,s,n) \ onigenc_step_back((enc),(start),(s),(n)) -#define ONIGENC_MBC_ENC_LEN(enc,p) (enc)->mbc_enc_len(p) +#define ONIGENC_MBC_ENC_LEN(enc,p,e) (enc)->mbc_enc_len(p,e) #define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len) #define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc) #define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len) diff --git a/include/ruby/regex.h b/include/ruby/regex.h index ad736775fe..b214c63d3e 100644 --- a/include/ruby/regex.h +++ b/include/ruby/regex.h @@ -29,8 +29,8 @@ extern "C" { ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding; -#define ismbchar(p, enc) (mbclen((p),(enc)) != 1) -#define mbclen(p,enc) rb_enc_mbclen((p), (enc)) +#define ismbchar(p, e, enc) (mbclen((p),(e),(enc)) != 1) +#define mbclen(p,e,enc) rb_enc_mbclen((p),(e),(enc)) #endif /* ifndef ONIG_RUBY_M17N */ -- cgit v1.2.3