diff options
Diffstat (limited to 'ext/spl/spl_observer.c')
-rw-r--r-- | ext/spl/spl_observer.c | 168 |
1 files changed, 84 insertions, 84 deletions
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index f7f884df18..4b63caaed0 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -102,11 +102,11 @@ static inline spl_SplObjectStorage *spl_object_storage_from_obj(zend_object *obj #define Z_SPLOBJSTORAGE_P(zv) spl_object_storage_from_obj(Z_OBJ_P((zv))) -void spl_SplObjectStorage_free_storage(zend_object *object TSRMLS_DC) /* {{{ */ +void spl_SplObjectStorage_free_storage(zend_object *object) /* {{{ */ { spl_SplObjectStorage *intern = spl_object_storage_from_obj(object); - zend_object_std_dtor(&intern->std TSRMLS_CC); + zend_object_std_dtor(&intern->std); zend_hash_destroy(&intern->storage); @@ -116,7 +116,7 @@ void spl_SplObjectStorage_free_storage(zend_object *object TSRMLS_DC) /* {{{ */ } } /* }}} */ -static zend_string *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zval *this, zval *obj TSRMLS_DC) { +static zend_string *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zval *this, zval *obj) { if (intern->fptr_get_hash) { zval rv; zend_call_method_with_1_params(this, intern->std.ce, &intern->fptr_get_hash, "getHash", &rv, obj); @@ -124,7 +124,7 @@ static zend_string *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zv if (Z_TYPE(rv) == IS_STRING) { return Z_STR(rv); } else { - zend_throw_exception(spl_ce_RuntimeException, "Hash needs to be a string", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_RuntimeException, "Hash needs to be a string", 0); zval_ptr_dtor(&rv); return NULL; @@ -190,21 +190,21 @@ static void spl_object_storage_dtor(zval *element) /* {{{ */ efree(el); } /* }}} */ -spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage *intern, zend_string *hash TSRMLS_DC) /* {{{ */ +spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage *intern, zend_string *hash) /* {{{ */ { return (spl_SplObjectStorageElement*)zend_hash_find_ptr(&intern->storage, hash); } /* }}} */ -spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *intern, zval *this, zval *obj, zval *inf TSRMLS_DC) /* {{{ */ +spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *intern, zval *this, zval *obj, zval *inf) /* {{{ */ { spl_SplObjectStorageElement *pelement, element; - zend_string *hash = spl_object_storage_get_hash(intern, this, obj TSRMLS_CC); + zend_string *hash = spl_object_storage_get_hash(intern, this, obj); if (!hash) { return NULL; } - pelement = spl_object_storage_get(intern, hash TSRMLS_CC); + pelement = spl_object_storage_get(intern, hash); if (pelement) { zval_ptr_dtor(&pelement->inf); @@ -228,10 +228,10 @@ spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *int return pelement; } /* }}} */ -int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, zval *obj TSRMLS_DC) /* {{{ */ +int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, zval *obj) /* {{{ */ { int ret = FAILURE; - zend_string *hash = spl_object_storage_get_hash(intern, this, obj TSRMLS_CC); + zend_string *hash = spl_object_storage_get_hash(intern, this, obj); if (!hash) { return ret; } @@ -241,17 +241,17 @@ int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, zval *ob return ret; } /* }}}*/ -void spl_object_storage_addall(spl_SplObjectStorage *intern, zval *this, spl_SplObjectStorage *other TSRMLS_DC) { /* {{{ */ +void spl_object_storage_addall(spl_SplObjectStorage *intern, zval *this, spl_SplObjectStorage *other) { /* {{{ */ spl_SplObjectStorageElement *element; ZEND_HASH_FOREACH_PTR(&other->storage, element) { - spl_object_storage_attach(intern, this, &element->obj, &element->inf TSRMLS_CC); + spl_object_storage_attach(intern, this, &element->obj, &element->inf); } ZEND_HASH_FOREACH_END(); intern->index = 0; } /* }}} */ -static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval *orig TSRMLS_DC) /* {{{ */ +static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval *orig) /* {{{ */ { spl_SplObjectStorage *intern; zend_class_entry *parent = class_type; @@ -260,7 +260,7 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval memset(intern, 0, sizeof(spl_SplObjectStorage) - sizeof(zval)); intern->pos = INVALID_IDX; - zend_object_std_init(&intern->std, class_type TSRMLS_CC); + zend_object_std_init(&intern->std, class_type); object_properties_init(&intern->std, class_type); zend_hash_init(&intern->storage, 0, NULL, spl_object_storage_dtor, 0); @@ -269,7 +269,7 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval if (orig) { spl_SplObjectStorage *other = Z_SPLOBJSTORAGE_P(orig); - spl_object_storage_addall(intern, orig, other TSRMLS_CC); + spl_object_storage_addall(intern, orig, other); } while (parent) { @@ -291,21 +291,21 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval /* }}} */ /* {{{ spl_object_storage_clone */ -static zend_object *spl_object_storage_clone(zval *zobject TSRMLS_DC) +static zend_object *spl_object_storage_clone(zval *zobject) { zend_object *old_object; zend_object *new_object; old_object = Z_OBJ_P(zobject); - new_object = spl_object_storage_new_ex(old_object->ce, zobject TSRMLS_CC); + new_object = spl_object_storage_new_ex(old_object->ce, zobject); - zend_objects_clone_members(new_object, old_object TSRMLS_CC); + zend_objects_clone_members(new_object, old_object); return new_object; } /* }}} */ -static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp TSRMLS_DC) /* {{{ */ +static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp) /* {{{ */ { spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(obj); spl_SplObjectStorageElement *element; @@ -330,7 +330,7 @@ static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp TSRMLS_D array_init(&storage); ZEND_HASH_FOREACH_PTR(&intern->storage, element) { - md5str = php_spl_object_hash(&element->obj TSRMLS_CC); + md5str = php_spl_object_hash(&element->obj); array_init(&tmp); /* Incrementing the refcount of obj and inf would confuse the garbage collector. * Prefer to null the destructor */ @@ -341,7 +341,7 @@ static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp TSRMLS_D zend_string_release(md5str); } ZEND_HASH_FOREACH_END(); - zname = spl_gen_private_prop_name(spl_ce_SplObjectStorage, "storage", sizeof("storage")-1 TSRMLS_CC); + zname = spl_gen_private_prop_name(spl_ce_SplObjectStorage, "storage", sizeof("storage")-1); zend_symtable_update(intern->debug_info, zname, &storage); zend_string_release(zname); } @@ -352,14 +352,14 @@ static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp TSRMLS_D /* overriden for garbage collection * This is very hacky */ -static HashTable *spl_object_storage_get_gc(zval *obj, zval **table, int *n TSRMLS_DC) /* {{{ */ +static HashTable *spl_object_storage_get_gc(zval *obj, zval **table, int *n) /* {{{ */ { spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(obj); spl_SplObjectStorageElement *element; HashTable *props; zval *gcdata_arr, tmp; - props = std_object_handlers.get_properties(obj TSRMLS_CC); + props = std_object_handlers.get_properties(obj); *table = NULL; *n = 0; @@ -388,13 +388,13 @@ static HashTable *spl_object_storage_get_gc(zval *obj, zval **table, int *n TSRM } /* }}} */ -static int spl_object_storage_compare_info(zval *e1, zval *e2 TSRMLS_DC) /* {{{ */ +static int spl_object_storage_compare_info(zval *e1, zval *e2) /* {{{ */ { spl_SplObjectStorageElement *s1 = (spl_SplObjectStorageElement*)Z_PTR_P(e1); spl_SplObjectStorageElement *s2 = (spl_SplObjectStorageElement*)Z_PTR_P(e2); zval result; - if (compare_function(&result, &s1->inf, &s2->inf TSRMLS_CC) == FAILURE) { + if (compare_function(&result, &s1->inf, &s2->inf) == FAILURE) { return 1; } @@ -402,7 +402,7 @@ static int spl_object_storage_compare_info(zval *e1, zval *e2 TSRMLS_DC) /* {{{ } /* }}} */ -static int spl_object_storage_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{{ */ +static int spl_object_storage_compare_objects(zval *o1, zval *o2) /* {{{ */ { zend_object *zo1 = (zend_object *)Z_OBJ_P(o1); zend_object *zo2 = (zend_object *)Z_OBJ_P(o2); @@ -411,21 +411,21 @@ static int spl_object_storage_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* { return 1; } - return zend_hash_compare(&(Z_SPLOBJSTORAGE_P(o1))->storage, &(Z_SPLOBJSTORAGE_P(o2))->storage, (compare_func_t)spl_object_storage_compare_info, 0 TSRMLS_CC); + return zend_hash_compare(&(Z_SPLOBJSTORAGE_P(o1))->storage, &(Z_SPLOBJSTORAGE_P(o2))->storage, (compare_func_t)spl_object_storage_compare_info, 0); } /* }}} */ /* {{{ spl_array_object_new */ -static zend_object *spl_SplObjectStorage_new(zend_class_entry *class_type TSRMLS_DC) +static zend_object *spl_SplObjectStorage_new(zend_class_entry *class_type) { - return spl_object_storage_new_ex(class_type, NULL TSRMLS_CC); + return spl_object_storage_new_ex(class_type, NULL); } /* }}} */ -int spl_object_storage_contains(spl_SplObjectStorage *intern, zval *this, zval *obj TSRMLS_DC) /* {{{ */ +int spl_object_storage_contains(spl_SplObjectStorage *intern, zval *this, zval *obj) /* {{{ */ { int found; - zend_string *hash = spl_object_storage_get_hash(intern, this, obj TSRMLS_CC); + zend_string *hash = spl_object_storage_get_hash(intern, this, obj); if (!hash) { return 0; } @@ -443,10 +443,10 @@ SPL_METHOD(SplObjectStorage, attach) spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis()); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|z!", &obj, &inf) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|z!", &obj, &inf) == FAILURE) { return; } - spl_object_storage_attach(intern, getThis(), obj, inf TSRMLS_CC); + spl_object_storage_attach(intern, getThis(), obj, inf); } /* }}} */ /* {{{ proto void SplObjectStorage::detach($obj) @@ -456,10 +456,10 @@ SPL_METHOD(SplObjectStorage, detach) zval *obj; spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis()); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) { return; } - spl_object_storage_detach(intern, getThis(), obj TSRMLS_CC); + spl_object_storage_detach(intern, getThis(), obj); zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); intern->index = 0; @@ -471,11 +471,11 @@ SPL_METHOD(SplObjectStorage, getHash) { zval *obj; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) { return; } - RETURN_NEW_STR(php_spl_object_hash(obj TSRMLS_CC)); + RETURN_NEW_STR(php_spl_object_hash(obj)); } /* }}} */ @@ -488,20 +488,20 @@ SPL_METHOD(SplObjectStorage, offsetGet) spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis()); zend_string *hash; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) { return; } - hash = spl_object_storage_get_hash(intern, getThis(), obj TSRMLS_CC); + hash = spl_object_storage_get_hash(intern, getThis(), obj); if (!hash) { return; } - element = spl_object_storage_get(intern, hash TSRMLS_CC); + element = spl_object_storage_get(intern, hash); spl_object_storage_free_hash(intern, hash); if (!element) { - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Object not found"); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Object not found"); } else { RETURN_ZVAL(&element->inf, 1, 0); } @@ -515,13 +515,13 @@ SPL_METHOD(SplObjectStorage, addAll) spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis()); spl_SplObjectStorage *other; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, spl_ce_SplObjectStorage) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &obj, spl_ce_SplObjectStorage) == FAILURE) { return; } other = Z_SPLOBJSTORAGE_P(obj); - spl_object_storage_addall(intern, getThis(), other TSRMLS_CC); + spl_object_storage_addall(intern, getThis(), other); RETURN_LONG(zend_hash_num_elements(&intern->storage)); } /* }}} */ @@ -535,7 +535,7 @@ SPL_METHOD(SplObjectStorage, removeAll) spl_SplObjectStorage *other; spl_SplObjectStorageElement *element; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, spl_ce_SplObjectStorage) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &obj, spl_ce_SplObjectStorage) == FAILURE) { return; } @@ -543,7 +543,7 @@ SPL_METHOD(SplObjectStorage, removeAll) zend_hash_internal_pointer_reset(&other->storage); while ((element = zend_hash_get_current_data_ptr(&other->storage)) != NULL) { - if (spl_object_storage_detach(intern, getThis(), &element->obj TSRMLS_CC) == FAILURE) { + if (spl_object_storage_detach(intern, getThis(), &element->obj) == FAILURE) { zend_hash_move_forward(&other->storage); } } @@ -563,15 +563,15 @@ SPL_METHOD(SplObjectStorage, removeAllExcept) spl_SplObjectStorage *other; spl_SplObjectStorageElement *element; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, spl_ce_SplObjectStorage) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &obj, spl_ce_SplObjectStorage) == FAILURE) { return; } other = Z_SPLOBJSTORAGE_P(obj); ZEND_HASH_FOREACH_PTR(&intern->storage, element) { - if (!spl_object_storage_contains(other, getThis(), &element->obj TSRMLS_CC)) { - spl_object_storage_detach(intern, getThis(), &element->obj TSRMLS_CC); + if (!spl_object_storage_contains(other, getThis(), &element->obj)) { + spl_object_storage_detach(intern, getThis(), &element->obj); } } ZEND_HASH_FOREACH_END(); @@ -589,10 +589,10 @@ SPL_METHOD(SplObjectStorage, contains) zval *obj; spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis()); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) { return; } - RETURN_BOOL(spl_object_storage_contains(intern, getThis(), obj TSRMLS_CC)); + RETURN_BOOL(spl_object_storage_contains(intern, getThis(), obj)); } /* }}} */ /* {{{ proto int SplObjectStorage::count() @@ -602,7 +602,7 @@ SPL_METHOD(SplObjectStorage, count) spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis()); zend_long mode = COUNT_NORMAL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &mode) == FAILURE) { return; } @@ -611,7 +611,7 @@ SPL_METHOD(SplObjectStorage, count) zval *element; ZEND_HASH_FOREACH_VAL(&intern->storage, element) { - ret += php_count_recursive(element, mode TSRMLS_CC); + ret += php_count_recursive(element, mode); } ZEND_HASH_FOREACH_END(); RETURN_LONG(ret); @@ -703,7 +703,7 @@ SPL_METHOD(SplObjectStorage, setInfo) spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis()); zval *inf; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &inf) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &inf) == FAILURE) { return; } @@ -749,7 +749,7 @@ SPL_METHOD(SplObjectStorage, serialize) /* storage */ smart_str_appendl(&buf, "x:", 2); ZVAL_LONG(&flags, zend_hash_num_elements(&intern->storage)); - php_var_serialize(&buf, &flags, &var_hash TSRMLS_CC); + php_var_serialize(&buf, &flags, &var_hash); zval_ptr_dtor(&flags); zend_hash_internal_pointer_reset_ex(&intern->storage, &pos); @@ -760,9 +760,9 @@ SPL_METHOD(SplObjectStorage, serialize) PHP_VAR_SERIALIZE_DESTROY(var_hash); RETURN_NULL(); } - php_var_serialize(&buf, &element->obj, &var_hash TSRMLS_CC); + php_var_serialize(&buf, &element->obj, &var_hash); smart_str_appendc(&buf, ','); - php_var_serialize(&buf, &element->inf, &var_hash TSRMLS_CC); + php_var_serialize(&buf, &element->inf, &var_hash); smart_str_appendc(&buf, ';'); zend_hash_move_forward_ex(&intern->storage, &pos); } @@ -770,8 +770,8 @@ SPL_METHOD(SplObjectStorage, serialize) /* members */ smart_str_appendl(&buf, "m:", 2); ZVAL_NEW_ARR(&members); - zend_array_dup(Z_ARRVAL(members), zend_std_get_properties(getThis() TSRMLS_CC)); - php_var_serialize(&buf, &members, &var_hash TSRMLS_CC); /* finishes the string */ + zend_array_dup(Z_ARRVAL(members), zend_std_get_properties(getThis())); + php_var_serialize(&buf, &members, &var_hash); /* finishes the string */ zval_ptr_dtor(&members); /* done */ @@ -799,7 +799,7 @@ SPL_METHOD(SplObjectStorage, unserialize) spl_SplObjectStorageElement *element; zend_long count; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &buf, &buf_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &buf, &buf_len) == FAILURE) { return; } @@ -816,7 +816,7 @@ SPL_METHOD(SplObjectStorage, unserialize) } ++p; - if (!php_var_unserialize(&pcount, &p, s + buf_len, &var_hash TSRMLS_CC)) { + if (!php_var_unserialize(&pcount, &p, s + buf_len, &var_hash)) { goto outexcept; } if (Z_TYPE(pcount) != IS_LONG) { @@ -839,7 +839,7 @@ SPL_METHOD(SplObjectStorage, unserialize) goto outexcept; } /* sore reference to allow cross-references between different elements */ - if (!php_var_unserialize(&entry, &p, s + buf_len, &var_hash TSRMLS_CC)) { + if (!php_var_unserialize(&entry, &p, s + buf_len, &var_hash)) { goto outexcept; } if (Z_TYPE(entry) != IS_OBJECT) { @@ -848,19 +848,19 @@ SPL_METHOD(SplObjectStorage, unserialize) } if (*p == ',') { /* new version has inf */ ++p; - if (!php_var_unserialize(&inf, &p, s + buf_len, &var_hash TSRMLS_CC)) { + if (!php_var_unserialize(&inf, &p, s + buf_len, &var_hash)) { zval_ptr_dtor(&entry); goto outexcept; } } - hash = spl_object_storage_get_hash(intern, getThis(), &entry TSRMLS_CC); + hash = spl_object_storage_get_hash(intern, getThis(), &entry); if (!hash) { zval_ptr_dtor(&entry); zval_ptr_dtor(&inf); goto outexcept; } - pelement = spl_object_storage_get(intern, hash TSRMLS_CC); + pelement = spl_object_storage_get(intern, hash); spl_object_storage_free_hash(intern, hash); if (pelement) { if (!Z_ISUNDEF(pelement->inf)) { @@ -870,7 +870,7 @@ SPL_METHOD(SplObjectStorage, unserialize) var_push_dtor(&var_hash, &pelement->obj); } } - element = spl_object_storage_attach(intern, getThis(), &entry, &inf TSRMLS_CC); + element = spl_object_storage_attach(intern, getThis(), &entry, &inf); var_replace(&var_hash, &entry, &element->obj); var_replace(&var_hash, &inf, &element->inf); zval_ptr_dtor(&entry); @@ -889,7 +889,7 @@ SPL_METHOD(SplObjectStorage, unserialize) ++p; ZVAL_UNDEF(&pmembers); - if (!php_var_unserialize(&pmembers, &p, s + buf_len, &var_hash TSRMLS_CC) || Z_TYPE(pmembers) != IS_ARRAY) { + if (!php_var_unserialize(&pmembers, &p, s + buf_len, &var_hash) || Z_TYPE(pmembers) != IS_ARRAY) { zval_ptr_dtor(&pmembers); goto outexcept; } @@ -906,7 +906,7 @@ SPL_METHOD(SplObjectStorage, unserialize) outexcept: PHP_VAR_UNSERIALIZE_DESTROY(var_hash); - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Error at offset %pd of %d bytes", (zend_long)((char*)p - buf), buf_len); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Error at offset %pd of %d bytes", (zend_long)((char*)p - buf), buf_len); return; } /* }}} */ @@ -986,16 +986,16 @@ SPL_METHOD(MultipleIterator, __construct) zend_long flags = MIT_NEED_ALL|MIT_KEYS_NUMERIC; zend_error_handling error_handling; - zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, &error_handling TSRMLS_CC); + zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, &error_handling); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flags) == FAILURE) { - zend_restore_error_handling(&error_handling TSRMLS_CC); + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flags) == FAILURE) { + zend_restore_error_handling(&error_handling); return; } intern = Z_SPLOBJSTORAGE_P(getThis()); intern->flags = flags; - zend_restore_error_handling(&error_handling TSRMLS_CC); + zend_restore_error_handling(&error_handling); } /* }}} */ @@ -1019,7 +1019,7 @@ SPL_METHOD(MultipleIterator, setFlags) spl_SplObjectStorage *intern; intern = Z_SPLOBJSTORAGE_P(getThis()); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intern->flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &intern->flags) == FAILURE) { return; } } @@ -1032,7 +1032,7 @@ SPL_METHOD(MultipleIterator, attachIterator) spl_SplObjectStorage *intern; zval *iterator = NULL, *info = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|z!", &iterator, zend_ce_iterator, &info) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|z!", &iterator, zend_ce_iterator, &info) == FAILURE) { return; } @@ -1043,22 +1043,22 @@ SPL_METHOD(MultipleIterator, attachIterator) zval compare_result; if (Z_TYPE_P(info) != IS_LONG && Z_TYPE_P(info) != IS_STRING) { - zend_throw_exception(spl_ce_InvalidArgumentException, "Info must be NULL, integer or string", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Info must be NULL, integer or string", 0); return; } zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); while ((element = zend_hash_get_current_data_ptr_ex(&intern->storage, &intern->pos)) != NULL) { - is_identical_function(&compare_result, info, &element->inf TSRMLS_CC); + is_identical_function(&compare_result, info, &element->inf); if (Z_TYPE(compare_result) == IS_TRUE) { - zend_throw_exception(spl_ce_InvalidArgumentException, "Key duplication error", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Key duplication error", 0); return; } zend_hash_move_forward_ex(&intern->storage, &intern->pos); } } - spl_object_storage_attach(intern, getThis(), iterator, info TSRMLS_CC); + spl_object_storage_attach(intern, getThis(), iterator, info); } /* }}} */ @@ -1152,7 +1152,7 @@ SPL_METHOD(MultipleIterator, valid) } /* }}} */ -static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_type, zval *return_value TSRMLS_DC) /* {{{ */ +static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_type, zval *return_value) /* {{{ */ { spl_SplObjectStorageElement *element; zval *it, retval; @@ -1184,14 +1184,14 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_ zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs.zf_key, "key", &retval); } if (Z_ISUNDEF(retval)) { - zend_throw_exception(spl_ce_RuntimeException, "Failed to call sub iterator method", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_RuntimeException, "Failed to call sub iterator method", 0); return; } } else if (intern->flags & MIT_NEED_ALL) { if (SPL_MULTIPLE_ITERATOR_GET_ALL_CURRENT == get_type) { - zend_throw_exception(spl_ce_RuntimeException, "Called current() with non valid sub iterator", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_RuntimeException, "Called current() with non valid sub iterator", 0); } else { - zend_throw_exception(spl_ce_RuntimeException, "Called key() with non valid sub iterator", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_RuntimeException, "Called key() with non valid sub iterator", 0); } return; } else { @@ -1208,7 +1208,7 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_ break; default: zval_ptr_dtor(&retval); - zend_throw_exception(spl_ce_InvalidArgumentException, "Sub-Iterator is associated with NULL", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Sub-Iterator is associated with NULL", 0); return; } } else { @@ -1231,7 +1231,7 @@ SPL_METHOD(MultipleIterator, current) return; } - spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_CURRENT, return_value TSRMLS_CC); + spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_CURRENT, return_value); } /* }}} */ @@ -1246,7 +1246,7 @@ SPL_METHOD(MultipleIterator, key) return; } - spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_KEY, return_value TSRMLS_CC); + spl_multiple_iterator_get_all(intern, SPL_MULTIPLE_ITERATOR_GET_ALL_KEY, return_value); } /* }}} */ |