Permalink
Browse files

Remove trailing space

  • Loading branch information...
1 parent a99ed41 commit 8b4628be91bf91967a6d110792ac85a454277b85 @cataphract committed Jun 10, 2012
@@ -76,11 +76,11 @@ static int BreakIterator_compare_objects(zval *object1,
bio1 = (BreakIterator_object*)zend_object_store_get_object(object1 TSRMLS_CC);
bio2 = (BreakIterator_object*)zend_object_store_get_object(object2 TSRMLS_CC);
-
+
if (bio1->biter == NULL || bio2->biter == NULL) {
return bio1->biter == bio2->biter ? 0 : 1;
}
-
+
return *bio1->biter == *bio2->biter ? 0 : 1;
}
/* }}} */
@@ -136,9 +136,9 @@ static HashTable *BreakIterator_get_debug_info(zval *object, int *is_temp TSRMLS
zval zv = zval_used_for_init;
BreakIterator_object *bio;
const BreakIterator *biter;
-
+
*is_temp = 1;
-
+
array_init_size(&zv, 8);
bio = (BreakIterator_object*)zend_object_store_get_object(object TSRMLS_CC);
@@ -149,14 +149,14 @@ static HashTable *BreakIterator_get_debug_info(zval *object, int *is_temp TSRMLS
return Z_ARRVAL(zv);
}
add_assoc_bool_ex(&zv, "valid", sizeof("valid"), 1);
-
+
if (bio->text == NULL) {
add_assoc_null_ex(&zv, "text", sizeof("text"));
} else {
zval_add_ref(&bio->text);
add_assoc_zval_ex(&zv, "text", sizeof("text"), bio->text);
}
-
+
add_assoc_string_ex(&zv, "type", sizeof("type"),
const_cast<char*>(typeid(*biter).name()), 1);
@@ -210,7 +210,7 @@ static zend_object_value BreakIterator_object_create(zend_class_entry *ce TSRMLS
BreakIterator_object* intern;
intern = (BreakIterator_object*)ecalloc(1, sizeof(BreakIterator_object));
-
+
zend_object_std_init(&intern->zo, ce TSRMLS_CC);
#if PHP_VERSION_ID < 50399
zend_hash_copy(intern->zo.properties, &(ce->default_properties),
@@ -324,7 +324,7 @@ void breakiterator_register_BreakIterator_class(TSRMLS_D)
BreakIterator_handlers.compare_objects = BreakIterator_compare_objects;
BreakIterator_handlers.clone_obj = BreakIterator_clone_obj;
BreakIterator_handlers.get_debug_info = BreakIterator_get_debug_info;
-
+
zend_class_implements(BreakIterator_ce_ptr TSRMLS_CC, 1,
zend_ce_traversable);
@@ -36,7 +36,7 @@ typedef struct {
// ICU break iterator
BreakIterator* biter;
-
+
// current text
zval *text;
} BreakIterator_object;
@@ -226,10 +226,10 @@ void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv,
U_CFUNC zend_object_value IntlPartsIterator_object_create(zend_class_entry *ce TSRMLS_DC)
{
zend_object_value retval;
-
+
retval = IntlIterator_ce_ptr->create_object(ce TSRMLS_CC);
retval.handlers = &IntlPartsIterator_handlers;
-
+
return retval;
}
@@ -263,7 +263,7 @@ U_CFUNC zend_function *IntlPartsIterator_get_method(zval **object_ptr,
goto end;
}
}
-
+
ret = std_object_handlers.get_method(object_ptr,
method, method_len, key TSRMLS_CC);
@@ -286,7 +286,7 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator)
}
INTLITERATOR_METHOD_FETCH_OBJECT;
-
+
zval *biter_zval = static_cast<zval*>(ii->iterator->data);
RETURN_ZVAL(biter_zval, 1, 0);
}
@@ -46,19 +46,19 @@ static void _breakiter_factory(const char *func_name,
char *msg;
UErrorCode status = UErrorCode();
intl_error_reset(NULL TSRMLS_CC);
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!",
&locale_str, &dummy) == FAILURE) {
spprintf(&msg, NULL, "%s: bad arguments", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);
RETURN_NULL();
}
-
+
if (locale_str == NULL) {
locale_str = intl_locale_get_default(TSRMLS_C);
}
-
+
biter = func(Locale::createFromName(locale_str), status);
intl_error_set_code(NULL, status TSRMLS_CC);
if (U_FAILURE(status)) {
@@ -68,7 +68,7 @@ static void _breakiter_factory(const char *func_name,
efree(msg);
RETURN_NULL();
}
-
+
breakiterator_object_create(return_value, biter TSRMLS_CC);
}
@@ -117,9 +117,9 @@ U_CFUNC PHP_FUNCTION(breakiter_get_text)
"breakiter_get_text: bad arguments", 0 TSRMLS_CC);
RETURN_FALSE;
}
-
+
BREAKITER_METHOD_FETCH_OBJECT;
-
+
if (bio->text == NULL) {
RETURN_NULL();
} else {
@@ -135,31 +135,31 @@ U_CFUNC PHP_FUNCTION(breakiter_set_text)
zval **textzv;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
-
+
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);
RETURN_FALSE;
}
-
+
int res = zend_get_parameters_ex(1, &textzv);
assert(res == SUCCESS);
-
+
BREAKITER_METHOD_FETCH_OBJECT;
-
+
/* assert it's safe to use text and text_len because zpp changes the
* arguments in the stack */
assert(text == Z_STRVAL_PP(textzv));
-
+
ut = utext_openUTF8(ut, text, text_len, BREAKITER_ERROR_CODE_P(bio));
INTL_CTOR_CHECK_STATUS(bio, "breakiter_set_text: error opening UText");
-
+
bio->biter->setText(ut, BREAKITER_ERROR_CODE(bio));
utext_close(ut); /* ICU shallow clones the UText */
INTL_CTOR_CHECK_STATUS(bio, "breakiter_set_text: error calling "
"BreakIterator::setText()");
-
+
/* When ICU clones the UText, it does not copy the buffer, so we have to
* keep the string buffer around by holding a reference to its zval. This
* also allows a faste implementation of getText() */
@@ -168,7 +168,7 @@ U_CFUNC PHP_FUNCTION(breakiter_set_text)
}
bio->text = *textzv;
zval_add_ref(&bio->text);
-
+
RETURN_TRUE;
}
@@ -180,18 +180,18 @@ static void _breakiter_no_args_ret_int32(
char *msg;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
-
+
if (zend_parse_parameters_none() == FAILURE) {
spprintf(&msg, NULL, "%s: bad arguments", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);
RETURN_FALSE;
}
-
+
BREAKITER_METHOD_FETCH_OBJECT;
-
+
int32_t res = (bio->biter->*func)();
-
+
RETURN_LONG((long)res);
}
@@ -204,26 +204,26 @@ static void _breakiter_int32_ret_int32(
long arg;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg) == FAILURE) {
spprintf(&msg, NULL, "%s: bad arguments", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);
RETURN_FALSE;
}
-
+
BREAKITER_METHOD_FETCH_OBJECT;
-
+
if (arg < INT32_MIN || arg > INT32_MAX) {
spprintf(&msg, NULL, "%s: offset argument is outside bounds of "
"a 32-bit wide integer", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);
RETURN_FALSE;
}
-
+
int32_t res = (bio->biter->*func)((int32_t)arg);
-
+
RETURN_LONG((long)res);
}
@@ -251,7 +251,7 @@ U_CFUNC PHP_FUNCTION(breakiter_previous)
U_CFUNC PHP_FUNCTION(breakiter_next)
{
bool no_arg_version = false;
-
+
if (ZEND_NUM_ARGS() == 0) {
no_arg_version = true;
} else if (ZEND_NUM_ARGS() == 1) {
@@ -265,7 +265,7 @@ U_CFUNC PHP_FUNCTION(breakiter_next)
no_arg_version = false;
}
}
-
+
if (no_arg_version) {
_breakiter_no_args_ret_int32("breakiter_next",
&BreakIterator::next,
@@ -281,17 +281,17 @@ U_CFUNC PHP_FUNCTION(breakiter_current)
{
BREAKITER_METHOD_INIT_VARS;
object = getThis();
-
+
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_current: bad arguments", 0 TSRMLS_CC);
RETURN_FALSE;
}
-
+
BREAKITER_METHOD_FETCH_OBJECT;
-
+
int32_t res = bio->biter->current();
-
+
RETURN_LONG((long)res);
}
@@ -314,25 +314,25 @@ U_CFUNC PHP_FUNCTION(breakiter_is_boundary)
long offset;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
-
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l",
&offset) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_is_boundary: bad arguments", 0 TSRMLS_CC);
RETURN_FALSE;
}
-
+
if (offset < INT32_MIN || offset > INT32_MAX) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_is_boundary: offset argument is outside bounds of "
"a 32-bit wide integer", 0 TSRMLS_CC);
RETURN_FALSE;
}
-
+
BREAKITER_METHOD_FETCH_OBJECT;
-
+
UBool res = bio->biter->isBoundary((int32_t)offset);
-
+
RETURN_BOOL((long)res);
}
@@ -368,7 +368,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator)
{
BREAKITER_METHOD_INIT_VARS;
object = getThis();
-
+
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_get_parts_iterator: bad arguments", 0 TSRMLS_CC);
Oops, something went wrong.

0 comments on commit 8b4628b

Please sign in to comment.