diff options
author | Aaron Piotrowski <aaron@trowski.com> | 2015-06-17 13:46:27 -0500 |
---|---|---|
committer | Aaron Piotrowski <aaron@trowski.com> | 2015-06-17 13:54:09 -0500 |
commit | c5eb924e9e43c59b564549e149b59ad9a4bee74a (patch) | |
tree | 6ac56d92c951bb887c0b987340de26899ce15764 | |
parent | 47fda68b031f8d1b1f3ec97e635af0726e34bdb7 (diff) | |
download | php-git-c5eb924e9e43c59b564549e149b59ad9a4bee74a.tar.gz |
Rename interface macros
Renamed REGISTER_INTERFACE (formerly
REGISTER_ITERATOR_INTERFACE) to
REGISTER_MAGIC_INTERFACE and renamed
REGISTER_ITERATOR_IMPLEMENT to
REGISTER_MAGIC_IMPLEMENT. Both have now been
moved to zend_interfaces.h.
-rw-r--r-- | Zend/zend_exceptions.c | 2 | ||||
-rw-r--r-- | Zend/zend_interfaces.c | 17 | ||||
-rw-r--r-- | Zend/zend_interfaces.h | 5 |
3 files changed, 12 insertions, 12 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 6b1d41efb9..e731e21718 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -792,7 +792,7 @@ void zend_register_default_exception(void) /* {{{ */ zend_class_entry ce; zend_property_info *prop; - REGISTER_INTERFACE(throwable, Throwable); + REGISTER_MAGIC_INTERFACE(throwable, Throwable); memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 0e5942554f..3b4d2042f1 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -551,23 +551,20 @@ const zend_function_entry zend_funcs_serializable[] = { }; /* }}} */ -#define REGISTER_ITERATOR_IMPLEMENT(class_name, interface_name) \ - zend_class_implements(zend_ce_ ## class_name, 1, zend_ce_ ## interface_name) - /* {{{ zend_register_interfaces */ ZEND_API void zend_register_interfaces(void) { - REGISTER_INTERFACE(traversable, Traversable); + REGISTER_MAGIC_INTERFACE(traversable, Traversable); - REGISTER_INTERFACE(aggregate, IteratorAggregate); - REGISTER_ITERATOR_IMPLEMENT(aggregate, traversable); + REGISTER_MAGIC_INTERFACE(aggregate, IteratorAggregate); + REGISTER_MAGIC_IMPLEMENT(aggregate, traversable); - REGISTER_INTERFACE(iterator, Iterator); - REGISTER_ITERATOR_IMPLEMENT(iterator, traversable); + REGISTER_MAGIC_INTERFACE(iterator, Iterator); + REGISTER_MAGIC_IMPLEMENT(iterator, traversable); - REGISTER_INTERFACE(arrayaccess, ArrayAccess); + REGISTER_MAGIC_INTERFACE(arrayaccess, ArrayAccess); - REGISTER_INTERFACE(serializable, Serializable); + REGISTER_MAGIC_INTERFACE(serializable, Serializable); } /* }}} */ diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h index d7b7645e16..1f7b9b3860 100644 --- a/Zend/zend_interfaces.h +++ b/Zend/zend_interfaces.h @@ -49,7 +49,7 @@ ZEND_API zval* zend_call_method(zval *object_pp, zend_class_entry *obj_ce, zend_ #define zend_call_method_with_2_params(obj, obj_ce, fn_proxy, function_name, retval, arg1, arg2) \ zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 2, arg1, arg2) -#define REGISTER_INTERFACE(class_name, class_name_str) \ +#define REGISTER_MAGIC_INTERFACE(class_name, class_name_str) \ {\ zend_class_entry ce;\ INIT_CLASS_ENTRY(ce, # class_name_str, zend_funcs_ ## class_name) \ @@ -57,6 +57,9 @@ ZEND_API zval* zend_call_method(zval *object_pp, zend_class_entry *obj_ce, zend_ zend_ce_ ## class_name->interface_gets_implemented = zend_implement_ ## class_name;\ } +#define REGISTER_MAGIC_IMPLEMENT(class_name, interface_name) \ + zend_class_implements(zend_ce_ ## class_name, 1, zend_ce_ ## interface_name) + ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter); ZEND_API int zend_user_it_valid(zend_object_iterator *_iter); ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *key); |