mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
oniguruma.h: constify
* include/ruby/oniguruma.h (OnigEncodingTypeST): constify property_name_to_ctype arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2ded8d0698
commit
8b9ad9d6f0
6 changed files with 10 additions and 10 deletions
|
@ -501,9 +501,9 @@ static const OnigCodePoint CR_Cyrillic[] = {
|
|||
#include "enc/jis/props.h"
|
||||
|
||||
static int
|
||||
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
|
||||
property_name_to_ctype(OnigEncoding enc, const UChar* p, const UChar* end)
|
||||
{
|
||||
UChar *s = p, *e = end;
|
||||
const UChar *s = p, *e = end;
|
||||
const struct enc_property *prop =
|
||||
onig_jis_property((const char* )s, (unsigned int )(e - s));
|
||||
|
||||
|
|
|
@ -490,9 +490,9 @@ static const OnigCodePoint CR_Cyrillic[] = {
|
|||
#include "enc/jis/props.h"
|
||||
|
||||
static int
|
||||
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
|
||||
property_name_to_ctype(OnigEncoding enc, const UChar* p, const UChar* end)
|
||||
{
|
||||
UChar *s = p, *e = end;
|
||||
const UChar *s = p, *e = end;
|
||||
const struct enc_property *prop =
|
||||
onig_jis_property((const char* )s, (unsigned int )(e - s));
|
||||
|
||||
|
|
|
@ -188,12 +188,12 @@ onigenc_utf16_32_get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
|
|||
#define PROPERTY_NAME_MAX_SIZE (MAX_WORD_LENGTH + 1)
|
||||
|
||||
extern int
|
||||
onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end)
|
||||
onigenc_unicode_property_name_to_ctype(OnigEncoding enc, const UChar* name, const UChar* end)
|
||||
{
|
||||
int len;
|
||||
int ctype;
|
||||
UChar buf[PROPERTY_NAME_MAX_SIZE];
|
||||
UChar *p;
|
||||
const UChar *p;
|
||||
OnigCodePoint code;
|
||||
|
||||
len = 0;
|
||||
|
|
|
@ -167,7 +167,7 @@ typedef struct OnigEncodingTypeST {
|
|||
int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, const struct OnigEncodingTypeST* enc);
|
||||
int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, const struct OnigEncodingTypeST* enc);
|
||||
int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[], const struct OnigEncodingTypeST* enc);
|
||||
int (*property_name_to_ctype)(const struct OnigEncodingTypeST* enc, OnigUChar* p, OnigUChar* end);
|
||||
int (*property_name_to_ctype)(const struct OnigEncodingTypeST* enc, const OnigUChar* p, const OnigUChar* end);
|
||||
int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype, const struct OnigEncodingTypeST* enc);
|
||||
int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], const struct OnigEncodingTypeST* enc);
|
||||
OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
|
||||
|
|
2
regenc.c
2
regenc.c
|
@ -790,7 +790,7 @@ onigenc_mb4_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
|
|||
}
|
||||
|
||||
extern int
|
||||
onigenc_minimum_property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
|
||||
onigenc_minimum_property_name_to_ctype(OnigEncoding enc, const UChar* p, const UChar* end)
|
||||
{
|
||||
static const PosixBracketEntryType PBS[] = {
|
||||
POSIX_BRACKET_ENTRY_INIT("Alnum", ONIGENC_CTYPE_ALNUM),
|
||||
|
|
4
regenc.h
4
regenc.h
|
@ -149,8 +149,8 @@ ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UC
|
|||
ONIG_EXTERN int onigenc_mbn_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower));
|
||||
ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
||||
ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
|
||||
ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end));
|
||||
ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end));
|
||||
ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
||||
ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
||||
ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
|
||||
ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
||||
ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
|
||||
|
|
Loading…
Reference in a new issue