Browse Source

adapted args in ext/intl

pull/535/head
Anatol Belski 12 years ago
parent
commit
457f28c354
  1. 8
      ext/intl/breakiterator/breakiterator_methods.cpp
  2. 4
      ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
  3. 12
      ext/intl/calendar/calendar_methods.cpp
  4. 4
      ext/intl/calendar/gregoriancalendar_methods.cpp
  5. 6
      ext/intl/collator/collator_compare.c
  6. 4
      ext/intl/collator/collator_create.c
  7. 8
      ext/intl/collator/collator_sort.c
  8. 29
      ext/intl/converter/converter.c
  9. 6
      ext/intl/dateformat/dateformat_attr.c
  10. 8
      ext/intl/dateformat/dateformat_create.cpp
  11. 4
      ext/intl/dateformat/dateformat_format_object.cpp
  12. 8
      ext/intl/dateformat/dateformat_parse.c
  13. 16
      ext/intl/formatter/formatter_attr.c
  14. 8
      ext/intl/formatter/formatter_format.c
  15. 6
      ext/intl/formatter/formatter_main.c
  16. 4
      ext/intl/formatter/formatter_parse.c

8
ext/intl/breakiterator/breakiterator_methods.cpp

@ -46,12 +46,12 @@ static void _breakiter_factory(const char *func_name,
{
BreakIterator *biter;
const char *locale_str = NULL;
int dummy;
zend_str_size_int dummy;
char *msg;
UErrorCode status = UErrorCode();
intl_error_reset(NULL TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S!",
&locale_str, &dummy) == FAILURE) {
spprintf(&msg, 0, "%s: bad arguments", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
@ -149,13 +149,13 @@ U_CFUNC PHP_FUNCTION(breakiter_get_text)
U_CFUNC PHP_FUNCTION(breakiter_set_text)
{
char *text;
int text_len;
zend_str_size_int text_len;
UText *ut = NULL;
zval **textzv;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S",
&text, &text_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_set_text: bad arguments", 0 TSRMLS_CC);

4
ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp

@ -33,12 +33,12 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
{
zval *object = getThis();
char *rules;
int rules_len;
zend_str_size_int rules_len;
zend_bool compiled = 0;
UErrorCode status = U_ZERO_ERROR;
intl_error_reset(NULL TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|b",
&rules, &rules_len, &compiled) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"rbbi_create_instance: bad arguments", 0 TSRMLS_CC);

12
ext/intl/calendar/calendar_methods.cpp

@ -51,12 +51,12 @@ U_CFUNC PHP_FUNCTION(intlcal_create_instance)
{
zval **zv_timezone = NULL;
const char *locale_str = NULL;
int dummy;
zend_str_size_int dummy;
TimeZone *timeZone;
UErrorCode status = U_ZERO_ERROR;
intl_error_reset(NULL TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|Zs!",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ZS!",
&zv_timezone, &locale_str, &dummy) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_create_calendar: bad arguments", 0 TSRMLS_CC);
@ -143,12 +143,12 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
UErrorCode status = U_ZERO_ERROR;
char *key,
*locale;
int key_len,
zend_str_size_int key_len,
locale_len;
zend_bool commonly_used;
intl_error_reset(NULL TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssb",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SSb",
&key, &key_len, &locale, &locale_len, &commonly_used) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_get_keyword_values_for_locale: bad arguments", 0 TSRMLS_CC);
@ -1144,13 +1144,13 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
*zv_timestamp = NULL;
php_date_obj *datetime;
char *locale_str = NULL;
int locale_str_len;
zend_str_size_int locale_str_len;
TimeZone *timeZone;
UErrorCode status = U_ZERO_ERROR;
Calendar *cal;
intl_error_reset(NULL TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|s!",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|S!",
&zv_arg, &locale_str, &locale_str_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_from_date_time: bad arguments", 0 TSRMLS_CC);

4
ext/intl/calendar/gregoriancalendar_methods.cpp

@ -42,7 +42,7 @@ static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
zval **args_a[6] = {0},
***args = &args_a[0];
char *locale = NULL;
int locale_len;
zend_str_size_int locale_len;
long largs[6];
UErrorCode status = U_ZERO_ERROR;
int variant;
@ -68,7 +68,7 @@ static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
// argument parsing
if (variant <= 2) {
if (zend_parse_parameters(MIN(ZEND_NUM_ARGS(), 2) TSRMLS_CC,
"|Z!s!", &tz_object, &locale, &locale_len) == FAILURE) {
"|Z!S!", &tz_object, &locale, &locale_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlgregcal_create_instance: bad arguments", 0 TSRMLS_CC);
RETURN_NULL();

6
ext/intl/collator/collator_compare.c

@ -33,8 +33,8 @@ PHP_FUNCTION( collator_compare )
{
char* str1 = NULL;
char* str2 = NULL;
int str1_len = 0;
int str2_len = 0;
zend_str_size_int str1_len = 0;
zend_str_size_int str2_len = 0;
UChar* ustr1 = NULL;
UChar* ustr2 = NULL;
@ -46,7 +46,7 @@ PHP_FUNCTION( collator_compare )
COLLATOR_METHOD_INIT_VARS
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OSS",
&object, Collator_ce_ptr, &str1, &str1_len, &str2, &str2_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,

4
ext/intl/collator/collator_create.c

@ -28,14 +28,14 @@
static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS)
{
char* locale;
int locale_len = 0;
zend_str_size_int locale_len = 0;
zval* object;
Collator_object* co;
intl_error_reset( NULL TSRMLS_CC );
object = return_value;
/* Parse parameters. */
if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s",
if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "S",
&locale, &locale_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,

8
ext/intl/collator/collator_sort.c

@ -546,16 +546,16 @@ PHP_FUNCTION( collator_asort )
PHP_FUNCTION( collator_get_sort_key )
{
char* str = NULL;
int str_len = 0;
zend_str_size_int str_len = 0;
UChar* ustr = NULL;
int ustr_len = 0;
zend_str_size_int ustr_len = 0;
uint8_t* key = NULL;
int key_len = 0;
zend_str_size_int key_len = 0;
COLLATOR_METHOD_INIT_VARS
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OS",
&object, Collator_ce_ptr, &str, &str_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,

29
ext/intl/converter/converter.c

@ -429,9 +429,9 @@ ZEND_END_ARG_INFO();
static void php_converter_do_set_encoding(UConverter *cnv, INTERNAL_FUNCTION_PARAMETERS) {
php_converter_object *objval = CONV_GET(getThis());
char *enc;
int enc_len;
zend_str_size_int enc_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &enc, &enc_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &enc, &enc_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Bad arguments, "
"expected one string argument", 0 TSRMLS_CC);
RETURN_FALSE;
@ -569,13 +569,13 @@ ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, __construct) {
php_converter_object *objval = CONV_GET(getThis());
char *src = "utf-8";
int src_len = sizeof("utf-8") - 1;
zend_str_size_int src_len = sizeof("utf-8") - 1;
char *dest = src;
int dest_len = src_len;
zend_str_size_int dest_len = src_len;
intl_error_reset(NULL TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S!S!",
&dest, &dest_len, &src, &src_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"UConverter::__construct(): bad arguments", 0 TSRMLS_CC);
@ -597,9 +597,10 @@ ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, setSubstChars) {
php_converter_object *objval = CONV_GET(getThis());
char *chars;
int chars_len, ret = 1;
zend_str_size_int chars_len;
int ret = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &chars, &chars_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &chars, &chars_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"UConverter::setSubstChars(): bad arguments", 0 TSRMLS_CC);
RETURN_FALSE;
@ -769,10 +770,10 @@ ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, convert) {
php_converter_object *objval = CONV_GET(getThis());
char *str, *dest;
int str_len, dest_len;
zend_str_size_int str_len, dest_len;
zend_bool reverse = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|b",
&str, &str_len, &reverse) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"UConverter::convert(): bad arguments", 0 TSRMLS_CC);
@ -802,11 +803,11 @@ ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, transcode) {
char *str, *src, *dest;
int str_len, src_len, dest_len;
zend_str_size_int str_len, src_len, dest_len;
zval *options = NULL;
UConverter *src_cnv = NULL, *dest_cnv = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|a!",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SSS|a!",
&str, &str_len, &dest, &dest_len, &src, &src_len, &options) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"UConverter::transcode(): bad arguments", 0 TSRMLS_CC);
@ -817,7 +818,7 @@ static PHP_METHOD(UConverter, transcode) {
if (php_converter_set_encoding(NULL, &src_cnv, src, src_len TSRMLS_CC) &&
php_converter_set_encoding(NULL, &dest_cnv, dest, dest_len TSRMLS_CC)) {
char *out = NULL;
int out_len = 0;
zend_str_size_int out_len = 0;
UErrorCode error = U_ZERO_ERROR;
if (options && zend_hash_num_elements(Z_ARRVAL_P(options))) {
@ -924,11 +925,11 @@ ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 0
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, getAliases) {
char *name;
int name_len;
zend_str_size_int name_len;
UErrorCode error = U_ZERO_ERROR;
uint16_t i, count;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &name, &name_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"UConverter::getAliases(): bad arguments", 0 TSRMLS_CC);
RETURN_FALSE;

6
ext/intl/dateformat/dateformat_attr.c

@ -128,8 +128,8 @@ PHP_FUNCTION( datefmt_get_pattern )
PHP_FUNCTION( datefmt_set_pattern )
{
char* value = NULL;
int value_len = 0;
int slength = 0;
zend_str_size_int value_len = 0;
zend_str_size_int slength = 0;
UChar* svalue = NULL;
zend_bool is_pattern_localized =FALSE;
@ -137,7 +137,7 @@ PHP_FUNCTION( datefmt_set_pattern )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OS",
&object, IntlDateFormatter_ce_ptr, &value, &value_len ) == FAILURE )
{
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,

8
ext/intl/dateformat/dateformat_create.cpp

@ -41,7 +41,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
zval *object;
const char *locale_str;
int locale_len = 0;
zend_str_size_int locale_len = 0;
Locale locale;
long date_type = 0;
long time_type = 0;
@ -53,15 +53,15 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
TimeZone *timezone = NULL;
bool explicit_tz;
char* pattern_str = NULL;
int pattern_str_len = 0;
zend_str_size_int pattern_str_len = 0;
UChar* svalue = NULL; /* UTF-16 pattern_str */
int slength = 0;
zend_str_size_int slength = 0;
IntlDateFormatter_object* dfo;
intl_error_reset(NULL TSRMLS_CC);
object = return_value;
/* Parse parameters. */
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll|Zzs",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sll|ZzS",
&locale_str, &locale_len, &date_type, &time_type, &timezone_zv,
&calendar_zv, &pattern_str, &pattern_str_len) == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: "

4
ext/intl/dateformat/dateformat_format_object.cpp

@ -63,7 +63,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
zval *object,
**format = NULL;
const char *locale_str = NULL;
int locale_len;
zend_str_size_int locale_len;
bool pattern = false;
UDate date;
TimeZone *timeZone = NULL;
@ -73,7 +73,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
DateFormat::EStyle dateStyle = DateFormat::kDefault,
timeStyle = DateFormat::kDefault;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|Zs!",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|ZS!",
&object, &format, &locale_str, &locale_len) == FAILURE) {
RETURN_FALSE;
}

8
ext/intl/dateformat/dateformat_parse.c

@ -128,14 +128,14 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex
PHP_FUNCTION(datefmt_parse)
{
char* text_to_parse = NULL;
int32_t text_len =0;
zend_str_size_int text_len =0;
zval* z_parse_pos = NULL;
int32_t parse_pos = -1;
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|z!",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OS|z!",
&object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse: unable to parse input params", 0 TSRMLS_CC );
RETURN_FALSE;
@ -166,14 +166,14 @@ PHP_FUNCTION(datefmt_parse)
PHP_FUNCTION(datefmt_localtime)
{
char* text_to_parse = NULL;
int32_t text_len =0;
zend_str_size_int text_len =0;
zval* z_parse_pos = NULL;
int32_t parse_pos = -1;
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|z!",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OS|z!",
&object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse_to_localtime: unable to parse input params", 0 TSRMLS_CC );
RETURN_FALSE;

16
ext/intl/formatter/formatter_attr.c

@ -211,11 +211,11 @@ PHP_FUNCTION( numfmt_set_text_attribute )
UChar *svalue = NULL;
long attribute;
char *value;
int len;
zend_str_size_int len;
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OlS",
&object, NumberFormatter_ce_ptr, &attribute, &value, &len ) == FAILURE)
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
@ -299,13 +299,13 @@ PHP_FUNCTION( numfmt_set_symbol )
{
long symbol;
char* value = NULL;
int value_len = 0;
zend_str_size_int value_len = 0;
UChar* svalue = 0;
int slength = 0;
zend_str_size_int slength = 0;
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OlS",
&object, NumberFormatter_ce_ptr, &symbol, &value, &value_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
@ -387,13 +387,13 @@ PHP_FUNCTION( numfmt_get_pattern )
PHP_FUNCTION( numfmt_set_pattern )
{
char* value = NULL;
int value_len = 0;
int slength = 0;
zend_str_size_int value_len = 0;
zend_str_size_int slength = 0;
UChar* svalue = NULL;
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OS",
&object, NumberFormatter_ce_ptr, &value, &value_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,

8
ext/intl/formatter/formatter_format.c

@ -139,15 +139,15 @@ PHP_FUNCTION( numfmt_format_currency )
double number;
UChar format_buf[32];
UChar* formatted = format_buf;
int formatted_len = USIZE(format_buf);
zend_str_size_int formatted_len = USIZE(format_buf);
char* currency = NULL;
int currency_len = 0;
zend_str_size_int currency_len = 0;
UChar* scurrency = NULL;
int scurrency_len = 0;
zend_str_size_int scurrency_len = 0;
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ods",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OdS",
&object, NumberFormatter_ce_ptr, &number, &currency, &currency_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,

6
ext/intl/formatter/formatter_main.c

@ -29,14 +29,14 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
{
char* locale;
char* pattern = NULL;
int locale_len = 0, pattern_len = 0;
zend_str_size_int locale_len = 0, pattern_len = 0;
long style;
UChar* spattern = NULL;
int spattern_len = 0;
zend_str_size_int spattern_len = 0;
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "sl|s",
if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "Sl|S",
&locale, &locale_len, &style, &pattern, &pattern_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,

4
ext/intl/formatter/formatter_parse.c

@ -40,7 +40,7 @@ PHP_FUNCTION( numfmt_parse )
UChar* sstr = NULL;
int sstr_len = 0;
char* str = NULL;
int str_len;
zend_str_size_int str_len;
int32_t val32, position = 0;
int64_t val64;
double val_double;
@ -50,7 +50,7 @@ PHP_FUNCTION( numfmt_parse )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|lz!",
if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OS|lz!",
&object, NumberFormatter_ce_ptr, &str, &str_len, &type, &zposition ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,

Loading…
Cancel
Save