Add Encoding::UNICODE_VERSION constant
This commit is contained in:
parent
5f3fb35a14
commit
b4417ff665
Notes:
git
2025-04-23 05:14:50 +00:00
@ -801,7 +801,6 @@ SpecialsCopy:
|
|||||||
return (int )(to - to_start);
|
return (int )(to - to_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
const char onigenc_unicode_version_string[] =
|
const char onigenc_unicode_version_string[] =
|
||||||
#ifdef ONIG_UNICODE_VERSION_STRING
|
#ifdef ONIG_UNICODE_VERSION_STRING
|
||||||
ONIG_UNICODE_VERSION_STRING
|
ONIG_UNICODE_VERSION_STRING
|
||||||
@ -817,4 +816,3 @@ const int onigenc_unicode_version_number[3] = {
|
|||||||
0
|
0
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
11
encoding.c
11
encoding.c
@ -1953,6 +1953,17 @@ Init_Encoding(void)
|
|||||||
rb_marshal_define_compat(rb_cEncoding, Qnil, 0, enc_m_loader);
|
rb_marshal_define_compat(rb_cEncoding, Qnil, 0, enc_m_loader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Init_unicode_version(void)
|
||||||
|
{
|
||||||
|
extern const char onigenc_unicode_version_string[];
|
||||||
|
|
||||||
|
VALUE str = rb_usascii_str_new_static(onigenc_unicode_version_string,
|
||||||
|
strlen(onigenc_unicode_version_string));
|
||||||
|
OBJ_FREEZE(str);
|
||||||
|
rb_define_const(rb_cEncoding, "UNICODE_VERSION", str);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_encodings(void)
|
Init_encodings(void)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user