mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* encoding.c (rb_enc_get_ascii): add an argument to provide the
length of the returned character. * include/ruby/encoding.h (rb_enc_get_ascii): add the argument. * re.c (rb_reg_expr_str): modify rb_enc_get_ascii call. (rb_reg_quote): ditto. (rb_reg_regsub): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ee1ab0e28
commit
5802768b40
4 changed files with 90 additions and 69 deletions
|
@ -72,14 +72,14 @@ rb_encoding * rb_enc_find(const char *name);
|
|||
/* ptr,endptr,encoding -> mbclen */
|
||||
int rb_enc_mbclen(const char*, const char *, rb_encoding*);
|
||||
|
||||
/* ptr,endptr,encoding -> chlen, invalid or needmore */
|
||||
int rb_enc_precise_mbclen(const char*, const char *, rb_encoding*);
|
||||
/* -> chlen, invalid or needmore */
|
||||
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc);
|
||||
#define MBCLEN_CHARFOUND(ret) ONIGENC_MBCLEN_CHARFOUND(ret)
|
||||
#define MBCLEN_INVALID(ret) ONIGENC_MBCLEN_INVALID(ret)
|
||||
#define MBCLEN_NEEDMORE(ret) ONIGENC_MBCLEN_NEEDMORE(ret)
|
||||
|
||||
/* ptr,endptr,encoding -> 0x00..0x7f, -1 */
|
||||
int rb_enc_get_ascii(const char*, const char *, rb_encoding*);
|
||||
/* -> 0x00..0x7f, -1 */
|
||||
int rb_enc_get_ascii(const char *p, const char *e, int *len, rb_encoding *enc);
|
||||
|
||||
/* code,encoding -> codelen */
|
||||
int rb_enc_codelen(int, rb_encoding*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue