mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Use new Fast ZPP macros for string|int parar types
Closes GH-5512
This commit is contained in:
parent
0e4c7b3264
commit
1f05966a41
@ -8,56 +8,53 @@
|
|||||||
|
|
||||||
#define IC_METHOD(mname) PHP_METHOD(IntlChar, mname)
|
#define IC_METHOD(mname) PHP_METHOD(IntlChar, mname)
|
||||||
|
|
||||||
static inline int convert_cp(UChar32* pcp, zval *zcp) {
|
static inline int convert_cp(UChar32* pcp, zend_string *string_codepoint, zend_long int_codepoint) {
|
||||||
zend_long cp = -1;
|
if (string_codepoint != NULL) {
|
||||||
|
|
||||||
if (Z_TYPE_P(zcp) == IS_LONG) {
|
|
||||||
cp = Z_LVAL_P(zcp);
|
|
||||||
} else if (Z_TYPE_P(zcp) == IS_STRING) {
|
|
||||||
int32_t i = 0;
|
int32_t i = 0;
|
||||||
size_t zcp_len = Z_STRLEN_P(zcp);
|
size_t string_codepoint_length = ZSTR_LEN(string_codepoint);
|
||||||
|
|
||||||
if (ZEND_SIZE_T_INT_OVFL(zcp_len)) {
|
if (ZEND_SIZE_T_INT_OVFL(string_codepoint_length)) {
|
||||||
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
|
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
|
||||||
intl_error_set_custom_msg(NULL, "Input string is too long.", 0);
|
intl_error_set_custom_msg(NULL, "Input string is too long.", 0);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
U8_NEXT(Z_STRVAL_P(zcp), i, zcp_len, cp);
|
U8_NEXT(ZSTR_VAL(string_codepoint), i, string_codepoint_length, int_codepoint);
|
||||||
if ((size_t)i != zcp_len) {
|
if ((size_t)i != string_codepoint_length) {
|
||||||
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
|
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
|
||||||
intl_error_set_custom_msg(NULL, "Passing a UTF-8 character for codepoint requires a string which is exactly one UTF-8 codepoint long.", 0);
|
intl_error_set_custom_msg(NULL, "Passing a UTF-8 character for codepoint requires a string which is exactly one UTF-8 codepoint long.", 0);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
|
|
||||||
intl_error_set_custom_msg(NULL, "Invalid parameter for unicode point. Must be either integer or UTF-8 sequence.", 0);
|
|
||||||
return FAILURE;
|
|
||||||
}
|
}
|
||||||
if ((cp < UCHAR_MIN_VALUE) || (cp > UCHAR_MAX_VALUE)) {
|
|
||||||
|
if ((int_codepoint < UCHAR_MIN_VALUE) || (int_codepoint > UCHAR_MAX_VALUE)) {
|
||||||
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
|
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
|
||||||
intl_error_set_custom_msg(NULL, "Codepoint out of range", 0);
|
intl_error_set_custom_msg(NULL, "Codepoint out of range", 0);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
*pcp = (UChar32)cp;
|
*pcp = (UChar32)int_codepoint;
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static zend_never_inline int parse_code_point_param(INTERNAL_FUNCTION_PARAMETERS, UChar32 *cp) {
|
||||||
|
zend_string *string_codepoint;
|
||||||
|
zend_long int_codepoint;
|
||||||
|
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||||
|
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint)
|
||||||
|
ZEND_PARSE_PARAMETERS_END_EX(return FAILURE);
|
||||||
|
return convert_cp(cp, string_codepoint, int_codepoint);
|
||||||
|
}
|
||||||
|
|
||||||
/* {{{ proto string IntlChar::chr(int|string $codepoint)
|
/* {{{ proto string IntlChar::chr(int|string $codepoint)
|
||||||
* Converts a numeric codepoint to UTF-8
|
* Converts a numeric codepoint to UTF-8
|
||||||
* Acts as an identify function when given a valid UTF-8 encoded codepoint
|
* Acts as an identify function when given a valid UTF-8 encoded codepoint
|
||||||
*/
|
*/
|
||||||
IC_METHOD(chr) {
|
IC_METHOD(chr) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zval *zcp;
|
|
||||||
char buffer[5];
|
char buffer[5];
|
||||||
int buffer_len = 0;
|
int buffer_len = 0;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) {
|
||||||
RETURN_THROWS();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,13 +73,8 @@ IC_METHOD(chr) {
|
|||||||
*/
|
*/
|
||||||
IC_METHOD(ord) {
|
IC_METHOD(ord) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zval *zcp;
|
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) {
|
||||||
RETURN_THROWS();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,13 +86,15 @@ IC_METHOD(ord) {
|
|||||||
IC_METHOD(hasBinaryProperty) {
|
IC_METHOD(hasBinaryProperty) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zend_long prop;
|
zend_long prop;
|
||||||
zval *zcp;
|
zend_string *string_codepoint;
|
||||||
|
zend_long int_codepoint;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zl", &zcp, &prop) == FAILURE) {
|
ZEND_PARSE_PARAMETERS_START(2, 2)
|
||||||
RETURN_THROWS();
|
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint)
|
||||||
}
|
Z_PARAM_LONG(prop)
|
||||||
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
if (convert_cp(&cp, string_codepoint, int_codepoint) == FAILURE) {
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,13 +106,15 @@ IC_METHOD(hasBinaryProperty) {
|
|||||||
IC_METHOD(getIntPropertyValue) {
|
IC_METHOD(getIntPropertyValue) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zend_long prop;
|
zend_long prop;
|
||||||
zval *zcp;
|
zend_string *string_codepoint;
|
||||||
|
zend_long int_codepoint;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zl", &zcp, &prop) == FAILURE) {
|
ZEND_PARSE_PARAMETERS_START(2, 2)
|
||||||
RETURN_THROWS();
|
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint)
|
||||||
}
|
Z_PARAM_LONG(prop)
|
||||||
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
if (convert_cp(&cp, string_codepoint, int_codepoint) == FAILURE) {
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,13 +149,8 @@ IC_METHOD(getIntPropertyMaxValue) {
|
|||||||
/* {{{ proto float IntlChar::getNumericValue(int|string $codepoint) */
|
/* {{{ proto float IntlChar::getNumericValue(int|string $codepoint) */
|
||||||
IC_METHOD(getNumericValue) {
|
IC_METHOD(getNumericValue) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zval *zcp;
|
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) {
|
||||||
RETURN_THROWS();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,8 +164,7 @@ typedef struct _enumCharType_data {
|
|||||||
zend_fcall_info_cache fci_cache;
|
zend_fcall_info_cache fci_cache;
|
||||||
} enumCharType_data;
|
} enumCharType_data;
|
||||||
static UBool enumCharType_callback(enumCharType_data *context,
|
static UBool enumCharType_callback(enumCharType_data *context,
|
||||||
UChar32 start, UChar32 limit,
|
UChar32 start, UChar32 limit, UCharCategory type) {
|
||||||
UCharCategory type) {
|
|
||||||
zval retval;
|
zval retval;
|
||||||
zval args[3];
|
zval args[3];
|
||||||
|
|
||||||
@ -212,13 +202,8 @@ IC_METHOD(enumCharTypes) {
|
|||||||
/* {{{ proto int IntlChar::getBlockCode(int|string $codepoint) */
|
/* {{{ proto int IntlChar::getBlockCode(int|string $codepoint) */
|
||||||
IC_METHOD(getBlockCode) {
|
IC_METHOD(getBlockCode) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zval *zcp;
|
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) {
|
||||||
RETURN_THROWS();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,17 +214,20 @@ IC_METHOD(getBlockCode) {
|
|||||||
/* {{{ proto string IntlChar::charName(int|string $codepoint, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */
|
/* {{{ proto string IntlChar::charName(int|string $codepoint, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */
|
||||||
IC_METHOD(charName) {
|
IC_METHOD(charName) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zval *zcp;
|
zend_string *string_codepoint;
|
||||||
|
zend_long int_codepoint;
|
||||||
UErrorCode error = U_ZERO_ERROR;
|
UErrorCode error = U_ZERO_ERROR;
|
||||||
zend_long nameChoice = U_UNICODE_CHAR_NAME;
|
zend_long nameChoice = U_UNICODE_CHAR_NAME;
|
||||||
zend_string *buffer = NULL;
|
zend_string *buffer = NULL;
|
||||||
int32_t buffer_len;
|
int32_t buffer_len;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &nameChoice) == FAILURE) {
|
ZEND_PARSE_PARAMETERS_START(1, 2)
|
||||||
RETURN_THROWS();
|
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint)
|
||||||
}
|
Z_PARAM_OPTIONAL
|
||||||
|
Z_PARAM_LONG(nameChoice)
|
||||||
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
if (convert_cp(&cp, string_codepoint, int_codepoint) == FAILURE) {
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,8 +267,8 @@ typedef struct _enumCharNames_data {
|
|||||||
zend_fcall_info_cache fci_cache;
|
zend_fcall_info_cache fci_cache;
|
||||||
} enumCharNames_data;
|
} enumCharNames_data;
|
||||||
static UBool enumCharNames_callback(enumCharNames_data *context,
|
static UBool enumCharNames_callback(enumCharNames_data *context,
|
||||||
UChar32 code, UCharNameChoice nameChoice,
|
UChar32 code, UCharNameChoice nameChoice,
|
||||||
const char *name, int32_t length) {
|
const char *name, int32_t length) {
|
||||||
zval retval;
|
zval retval;
|
||||||
zval args[3];
|
zval args[3];
|
||||||
|
|
||||||
@ -306,16 +294,22 @@ static UBool enumCharNames_callback(enumCharNames_data *context,
|
|||||||
}
|
}
|
||||||
IC_METHOD(enumCharNames) {
|
IC_METHOD(enumCharNames) {
|
||||||
UChar32 start, limit;
|
UChar32 start, limit;
|
||||||
zval *zstart, *zlimit;
|
zend_string *string_start, *string_limit;
|
||||||
|
zend_long int_start, int_limit;
|
||||||
enumCharNames_data context;
|
enumCharNames_data context;
|
||||||
zend_long nameChoice = U_UNICODE_CHAR_NAME;
|
zend_long nameChoice = U_UNICODE_CHAR_NAME;
|
||||||
UErrorCode error = U_ZERO_ERROR;
|
UErrorCode error = U_ZERO_ERROR;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzf|l", &zstart, &zlimit, &context.fci, &context.fci_cache, &nameChoice) == FAILURE) {
|
|
||||||
RETURN_THROWS();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (convert_cp(&start, zstart) == FAILURE || convert_cp(&limit, zlimit) == FAILURE) {
|
ZEND_PARSE_PARAMETERS_START(3, 4)
|
||||||
|
Z_PARAM_STR_OR_LONG(string_start, int_start)
|
||||||
|
Z_PARAM_STR_OR_LONG(string_limit, int_limit)
|
||||||
|
Z_PARAM_FUNC(context.fci, context.fci_cache)
|
||||||
|
Z_PARAM_OPTIONAL
|
||||||
|
Z_PARAM_LONG(nameChoice)
|
||||||
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
|
if (convert_cp(&start, string_start, int_start) == FAILURE || convert_cp(&limit, string_limit, int_limit) == FAILURE) {
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,19 +389,21 @@ IC_METHOD(getPropertyValueEnum) {
|
|||||||
/* {{{ proto int|string IntlChar::foldCase(int|string $codepoint, int $options = IntlChar::FOLD_CASE_DEFAULT) */
|
/* {{{ proto int|string IntlChar::foldCase(int|string $codepoint, int $options = IntlChar::FOLD_CASE_DEFAULT) */
|
||||||
IC_METHOD(foldCase) {
|
IC_METHOD(foldCase) {
|
||||||
UChar32 cp, ret;
|
UChar32 cp, ret;
|
||||||
zval *zcp;
|
|
||||||
zend_long options = U_FOLD_CASE_DEFAULT;
|
zend_long options = U_FOLD_CASE_DEFAULT;
|
||||||
|
zend_string *string_codepoint;
|
||||||
|
zend_long int_codepoint;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &options) == FAILURE) {
|
ZEND_PARSE_PARAMETERS_START(2, 2)
|
||||||
RETURN_THROWS();
|
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint)
|
||||||
}
|
Z_PARAM_LONG(options)
|
||||||
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
if (convert_cp(&cp, string_codepoint, int_codepoint) == FAILURE) {
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = u_foldCase(cp, options);
|
ret = u_foldCase(cp, options);
|
||||||
if (Z_TYPE_P(zcp) == IS_STRING) {
|
if (string_codepoint != NULL) {
|
||||||
char buffer[5];
|
char buffer[5];
|
||||||
int buffer_len = 0;
|
int buffer_len = 0;
|
||||||
U8_APPEND_UNSAFE(buffer, buffer_len, ret);
|
U8_APPEND_UNSAFE(buffer, buffer_len, ret);
|
||||||
@ -422,15 +418,18 @@ IC_METHOD(foldCase) {
|
|||||||
/* {{{ proto int IntlChar::digit(int|string $codepoint[, int $radix = 10]) */
|
/* {{{ proto int IntlChar::digit(int|string $codepoint[, int $radix = 10]) */
|
||||||
IC_METHOD(digit) {
|
IC_METHOD(digit) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zval *zcp;
|
|
||||||
zend_long radix = 10;
|
zend_long radix = 10;
|
||||||
int ret;
|
int ret;
|
||||||
|
zend_string *string_codepoint;
|
||||||
|
zend_long int_codepoint;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &radix) == FAILURE) {
|
ZEND_PARSE_PARAMETERS_START(1, 2)
|
||||||
RETURN_THROWS();
|
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint)
|
||||||
}
|
Z_PARAM_OPTIONAL
|
||||||
|
Z_PARAM_LONG(radix)
|
||||||
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
if (convert_cp(&cp, string_codepoint, int_codepoint) == FAILURE) {
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,15 +458,10 @@ IC_METHOD(forDigit) {
|
|||||||
/* {{{ proto array IntlChar::charAge(int|string $codepoint) */
|
/* {{{ proto array IntlChar::charAge(int|string $codepoint) */
|
||||||
IC_METHOD(charAge) {
|
IC_METHOD(charAge) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zval *zcp;
|
|
||||||
UVersionInfo version;
|
UVersionInfo version;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) {
|
||||||
RETURN_THROWS();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,17 +493,12 @@ IC_METHOD(getUnicodeVersion) {
|
|||||||
/* {{{ proto string IntlChar::getFC_NFKC_Closure(int|string $codepoint) */
|
/* {{{ proto string IntlChar::getFC_NFKC_Closure(int|string $codepoint) */
|
||||||
IC_METHOD(getFC_NFKC_Closure) {
|
IC_METHOD(getFC_NFKC_Closure) {
|
||||||
UChar32 cp;
|
UChar32 cp;
|
||||||
zval *zcp;
|
|
||||||
UChar *closure;
|
UChar *closure;
|
||||||
zend_string *u8str;
|
zend_string *u8str;
|
||||||
int32_t closure_len;
|
int32_t closure_len;
|
||||||
UErrorCode error = U_ZERO_ERROR;
|
UErrorCode error = U_ZERO_ERROR;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) {
|
||||||
RETURN_THROWS();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
|
||||||
RETURN_NULL();
|
RETURN_NULL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,9 +525,10 @@ IC_METHOD(getFC_NFKC_Closure) {
|
|||||||
/* {{{ proto bool IntlChar::<name>(int|string $codepoint) */
|
/* {{{ proto bool IntlChar::<name>(int|string $codepoint) */
|
||||||
#define IC_BOOL_METHOD_CHAR(name) \
|
#define IC_BOOL_METHOD_CHAR(name) \
|
||||||
IC_METHOD(name) { \
|
IC_METHOD(name) { \
|
||||||
UChar32 cp; zval *zcp; \
|
UChar32 cp; \
|
||||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) || \
|
if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) { \
|
||||||
(convert_cp(&cp, zcp) == FAILURE)) { return; } \
|
RETURN_NULL(); \
|
||||||
|
} \
|
||||||
RETURN_BOOL(u_##name(cp)); \
|
RETURN_BOOL(u_##name(cp)); \
|
||||||
}
|
}
|
||||||
IC_BOOL_METHOD_CHAR(isUAlphabetic)
|
IC_BOOL_METHOD_CHAR(isUAlphabetic)
|
||||||
@ -575,9 +565,10 @@ IC_BOOL_METHOD_CHAR(isJavaIDPart)
|
|||||||
/* {{{ proto int IntlChar::<name>(int|string $codepoint) */
|
/* {{{ proto int IntlChar::<name>(int|string $codepoint) */
|
||||||
#define IC_INT_METHOD_CHAR(name) \
|
#define IC_INT_METHOD_CHAR(name) \
|
||||||
IC_METHOD(name) { \
|
IC_METHOD(name) { \
|
||||||
UChar32 cp; zval *zcp; \
|
UChar32 cp; \
|
||||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) || \
|
if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) { \
|
||||||
(convert_cp(&cp, zcp) == FAILURE)) { return; } \
|
RETURN_NULL(); \
|
||||||
|
} \
|
||||||
RETURN_LONG(u_##name(cp)); \
|
RETURN_LONG(u_##name(cp)); \
|
||||||
}
|
}
|
||||||
IC_INT_METHOD_CHAR(charDirection)
|
IC_INT_METHOD_CHAR(charDirection)
|
||||||
@ -593,11 +584,17 @@ IC_INT_METHOD_CHAR(charDigitValue)
|
|||||||
*/
|
*/
|
||||||
#define IC_CHAR_METHOD_CHAR(name) \
|
#define IC_CHAR_METHOD_CHAR(name) \
|
||||||
IC_METHOD(name) { \
|
IC_METHOD(name) { \
|
||||||
UChar32 cp, ret; zval *zcp; \
|
UChar32 cp, ret; \
|
||||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) || \
|
zend_string *string_codepoint; \
|
||||||
(convert_cp(&cp, zcp) == FAILURE)) { return; } \
|
zend_long int_codepoint; \
|
||||||
|
ZEND_PARSE_PARAMETERS_START(1, 1) \
|
||||||
|
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint) \
|
||||||
|
ZEND_PARSE_PARAMETERS_END(); \
|
||||||
|
if (convert_cp(&cp, string_codepoint, int_codepoint) == FAILURE) { \
|
||||||
|
RETURN_NULL(); \
|
||||||
|
} \
|
||||||
ret = u_##name(cp); \
|
ret = u_##name(cp); \
|
||||||
if (Z_TYPE_P(zcp) == IS_STRING) { \
|
if (string_codepoint != NULL) { \
|
||||||
char buffer[5]; \
|
char buffer[5]; \
|
||||||
int buffer_len = 0; \
|
int buffer_len = 0; \
|
||||||
U8_APPEND_UNSAFE(buffer, buffer_len, ret); \
|
U8_APPEND_UNSAFE(buffer, buffer_len, ret); \
|
||||||
|
@ -4,107 +4,64 @@
|
|||||||
|
|
||||||
class IntlChar
|
class IntlChar
|
||||||
{
|
{
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function hasBinaryProperty(int|string $codepoint, int $property) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function hasBinaryProperty($codepoint, int $property) {}
|
|
||||||
|
|
||||||
/**
|
/** @return array|null */
|
||||||
* @param int|string $codepoint
|
public static function charAge(int|string $codepoint) {}
|
||||||
* @return array|null
|
|
||||||
*/
|
|
||||||
public static function charAge($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|null */
|
||||||
* @param int|string $codepoint
|
public static function charDigitValue(int|string $codepoint) {}
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public static function charDigitValue($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|null
|
||||||
* @param int|string $codepoint
|
|
||||||
* @return int|null
|
|
||||||
*/
|
*/
|
||||||
public static function charDirection($codepoint) {}
|
public static function charDirection(int|string $codepoint) {}
|
||||||
|
|
||||||
/** @return int|null */
|
/** @return int|null */
|
||||||
public static function charFromName(string $characterName, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) {}
|
public static function charFromName(string $characterName, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) {}
|
||||||
|
|
||||||
/**
|
/** @return int|string|null */
|
||||||
* @param int|string $codepoint
|
public static function charMirror(int|string $codepoint) {}
|
||||||
* @return int|string|null
|
|
||||||
*/
|
|
||||||
public static function charMirror($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return string|null */
|
||||||
* @param int|string $codepoint
|
public static function charName(int|string $codepoint, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) {}
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public static function charName($codepoint, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|null */
|
||||||
* @param int|string $codepoint
|
public static function charType(int|string $codepoint) {}
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public static function charType($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return string|null */
|
||||||
* @param int|string $codepoint
|
public static function chr(int|string $codepoint) {}
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public static function chr($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|false|null */
|
||||||
* @param int|string $codepoint
|
public static function digit(int|string $codepoint, int $radix = 10) {}
|
||||||
* @return int|false|null
|
|
||||||
*/
|
|
||||||
public static function digit($codepoint, int $radix = 10) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $start
|
public static function enumCharNames(int|string $start, int|string $limit, callable $callback, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) {}
|
||||||
* @param int|string $limit
|
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function enumCharNames($start, $limit, callable $callback, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) {}
|
|
||||||
|
|
||||||
/** @return void */
|
/** @return void */
|
||||||
public static function enumCharTypes(callable $callback) {}
|
public static function enumCharTypes(callable $callback) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int|string $codepoint
|
|
||||||
* @return int|string|null
|
* @return int|string|null
|
||||||
*/
|
*/
|
||||||
public static function foldCase($codepoint, int $options = IntlChar::FOLD_CASE_DEFAULT) {}
|
public static function foldCase(int|string $codepoint, int $options = IntlChar::FOLD_CASE_DEFAULT) {}
|
||||||
|
|
||||||
/** @return int */
|
/** @return int */
|
||||||
public static function forDigit(int $digit, $radix = 10) {}
|
public static function forDigit(int $digit, $radix = 10) {}
|
||||||
|
|
||||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||||
/**
|
/** @return int|string|null */
|
||||||
* @param int|string $codepoint
|
public static function getBidiPairedBracket(int|string $codepoint) {}
|
||||||
* @return int|string|null
|
|
||||||
*/
|
|
||||||
public static function getBidiPairedBracket($codepoint) {}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/** @return int|null */
|
||||||
* @param int|string $codepoint
|
public static function getBlockCode(int|string $codepoint) {}
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public static function getBlockCode($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|null */
|
||||||
* @param int|string $codepoint
|
public static function getCombiningClass(int|string $codepoint) {}
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public static function getCombiningClass($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return string|false|null */
|
||||||
* @param int|string $codepoint
|
public static function getFC_NFKC_Closure(int|string $codepoint) {}
|
||||||
* @return string|false|null
|
|
||||||
*/
|
|
||||||
public static function getFC_NFKC_Closure($codepoint) {}
|
|
||||||
|
|
||||||
/** @return int */
|
/** @return int */
|
||||||
public static function getIntPropertyMaxValue(int $property) {}
|
public static function getIntPropertyMaxValue(int $property) {}
|
||||||
@ -112,22 +69,13 @@ class IntlChar
|
|||||||
/** @return int */
|
/** @return int */
|
||||||
public static function getIntPropertyMinValue(int $property) {}
|
public static function getIntPropertyMinValue(int $property) {}
|
||||||
|
|
||||||
/**
|
/** @return int|null */
|
||||||
* @param int|string $codepoint
|
public static function getIntPropertyValue(int|string $codepoint, int $property) {}
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public static function getIntPropertyValue($codepoint, int $property) {}
|
|
||||||
|
|
||||||
/**
|
/** @return float|null */
|
||||||
* @param int|string $codepoint
|
public static function getNumericValue(int|string $codepoint) {}
|
||||||
* @return float|null
|
|
||||||
*/
|
|
||||||
public static function getNumericValue($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int */
|
||||||
* @param string $alias
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public static function getPropertyEnum(string $alias) {}
|
public static function getPropertyEnum(string $alias) {}
|
||||||
|
|
||||||
/** @return string|false */
|
/** @return string|false */
|
||||||
@ -137,200 +85,104 @@ class IntlChar
|
|||||||
public static function getPropertyValueEnum(int $property, string $name) {}
|
public static function getPropertyValueEnum(int $property, string $name) {}
|
||||||
|
|
||||||
/** @return string|false */
|
/** @return string|false */
|
||||||
public static function getPropertyValueName(int $property, int $value, $nameChoice = IntlChar::LONG_PROPERTY_NAME) {}
|
public static function getPropertyValueName(int $property, int $value, int $nameChoice = IntlChar::LONG_PROPERTY_NAME) {}
|
||||||
|
|
||||||
/** @return array */
|
/** @return array */
|
||||||
public static function getUnicodeVersion() {}
|
public static function getUnicodeVersion() {}
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isalnum(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isalnum($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isalpha(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isalpha($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isbase(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isbase($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isblank(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isblank($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function iscntrl(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function iscntrl($codepoint ) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isdefined(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isdefined($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isdigit(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isdigit($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isgraph(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isgraph($codepoint ) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isIDIgnorable(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isIDIgnorable($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isIDPart(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isIDPart($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isIDStart(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isIDStart($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isISOControl(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isISOControl($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isJavaIDPart(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isJavaIDPart($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isJavaIDStart(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isJavaIDStart($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isJavaSpaceChar(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isJavaSpaceChar($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function islower(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function islower($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isMirrored(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isMirrored($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isprint(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isprint($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function ispunct(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function ispunct($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isspace(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isspace($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function istitle(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function istitle($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isUAlphabetic(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isUAlphabetic($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isULowercase(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isULowercase($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isupper(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isupper($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isUUppercase(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isUUppercase($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isUWhiteSpace(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isUWhiteSpace($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isWhitespace(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isWhitespace($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return bool|null */
|
||||||
* @param int|string $codepoint
|
public static function isxdigit(int|string $codepoint) {}
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public static function isxdigit($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|null */
|
||||||
* @param int|string $character
|
public static function ord(int|string $character) {}
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public static function ord($character) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|string|null */
|
||||||
* @param int|string $codepoint
|
public static function tolower(int|string $codepoint) {}
|
||||||
* @return int|string|null
|
|
||||||
*/
|
|
||||||
public static function tolower($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|string|null */
|
||||||
* @param mixed $codepoint
|
public static function totitle(int|string $codepoint) {}
|
||||||
* @return int|string|null
|
|
||||||
*/
|
|
||||||
public static function totitle($codepoint) {}
|
|
||||||
|
|
||||||
/**
|
/** @return int|string|null */
|
||||||
* @param int|string $codepoint
|
public static function toupper(int|string $codepoint) {}
|
||||||
* @return int|string|null
|
|
||||||
*/
|
|
||||||
public static function toupper($codepoint) {}
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/* This is a generated file, edit the .stub.php file instead. */
|
/* This is a generated file, edit the .stub.php file instead. */
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_hasBinaryProperty, 0, 0, 2)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_hasBinaryProperty, 0, 0, 2)
|
||||||
ZEND_ARG_INFO(0, codepoint)
|
ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0)
|
ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0)
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charAge, 0, 0, 1)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charAge, 0, 0, 1)
|
||||||
ZEND_ARG_INFO(0, codepoint)
|
ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
#define arginfo_class_IntlChar_charDigitValue arginfo_class_IntlChar_charAge
|
#define arginfo_class_IntlChar_charDigitValue arginfo_class_IntlChar_charAge
|
||||||
@ -21,7 +21,7 @@ ZEND_END_ARG_INFO()
|
|||||||
#define arginfo_class_IntlChar_charMirror arginfo_class_IntlChar_charAge
|
#define arginfo_class_IntlChar_charMirror arginfo_class_IntlChar_charAge
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charName, 0, 0, 1)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_charName, 0, 0, 1)
|
||||||
ZEND_ARG_INFO(0, codepoint)
|
ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::UNICODE_CHAR_NAME")
|
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::UNICODE_CHAR_NAME")
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
@ -30,13 +30,13 @@ ZEND_END_ARG_INFO()
|
|||||||
#define arginfo_class_IntlChar_chr arginfo_class_IntlChar_charAge
|
#define arginfo_class_IntlChar_chr arginfo_class_IntlChar_charAge
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_digit, 0, 0, 1)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_digit, 0, 0, 1)
|
||||||
ZEND_ARG_INFO(0, codepoint)
|
ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, radix, IS_LONG, 0, "10")
|
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, radix, IS_LONG, 0, "10")
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_enumCharNames, 0, 0, 3)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_enumCharNames, 0, 0, 3)
|
||||||
ZEND_ARG_INFO(0, start)
|
ZEND_ARG_TYPE_MASK(0, start, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_ARG_INFO(0, limit)
|
ZEND_ARG_TYPE_MASK(0, limit, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
|
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
|
||||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::UNICODE_CHAR_NAME")
|
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::UNICODE_CHAR_NAME")
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
@ -46,7 +46,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_enumCharTypes, 0, 0, 1)
|
|||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_foldCase, 0, 0, 1)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_foldCase, 0, 0, 1)
|
||||||
ZEND_ARG_INFO(0, codepoint)
|
ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "IntlChar::FOLD_CASE_DEFAULT")
|
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "IntlChar::FOLD_CASE_DEFAULT")
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ ZEND_END_ARG_INFO()
|
|||||||
|
|
||||||
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
#if U_ICU_VERSION_MAJOR_NUM >= 52
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getBidiPairedBracket, 0, 0, 1)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getBidiPairedBracket, 0, 0, 1)
|
||||||
ZEND_ARG_INFO(0, codepoint)
|
ZEND_ARG_TYPE_MASK(0, codepoint, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ ZEND_END_ARG_INFO()
|
|||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyValueName, 0, 0, 2)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getPropertyValueName, 0, 0, 2)
|
||||||
ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0)
|
ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0)
|
||||||
ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0)
|
ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0)
|
||||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, nameChoice, "IntlChar::LONG_PROPERTY_NAME")
|
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nameChoice, IS_LONG, 0, "IntlChar::LONG_PROPERTY_NAME")
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getUnicodeVersion, 0, 0, 0)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_getUnicodeVersion, 0, 0, 0)
|
||||||
@ -157,7 +157,7 @@ ZEND_END_ARG_INFO()
|
|||||||
#define arginfo_class_IntlChar_isxdigit arginfo_class_IntlChar_charAge
|
#define arginfo_class_IntlChar_isxdigit arginfo_class_IntlChar_charAge
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_ord, 0, 0, 1)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlChar_ord, 0, 0, 1)
|
||||||
ZEND_ARG_INFO(0, character)
|
ZEND_ARG_TYPE_MASK(0, character, MAY_BE_LONG|MAY_BE_STRING, NULL)
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
#define arginfo_class_IntlChar_tolower arginfo_class_IntlChar_charAge
|
#define arginfo_class_IntlChar_tolower arginfo_class_IntlChar_charAge
|
||||||
|
Loading…
Reference in New Issue
Block a user