From 7f35aa1d094dff2e668eb14fe9af78c95e1030ec Mon Sep 17 00:00:00 2001 From: Marcos Marcolin Date: Sun, 26 Feb 2023 10:04:46 -0300 Subject: [PATCH] chore: standardize the visibility of functions. --- ext/spl/spl_array.c | 2 +- ext/spl/spl_directory.c | 8 ++++---- ext/spl/spl_dllist.c | 2 +- ext/spl/spl_fixedarray.c | 2 +- ext/spl/spl_heap.c | 4 ++-- ext/spl/spl_iterators.c | 4 ++-- ext/spl/spl_observer.c | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 337c2b9902fba..9d718369886f1 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1054,7 +1054,7 @@ static const zend_object_iterator_funcs spl_array_it_funcs = { spl_array_it_get_gc, }; -zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ +static zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ { zend_object_iterator *iterator = emalloc(sizeof(zend_object_iterator)); zend_iterator_init(iterator); diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index d1dc2e2027495..8fa3627582c5e 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -695,7 +695,7 @@ static inline HashTable *spl_filesystem_object_get_debug_info(zend_object *objec } /* }}} */ -zend_function *spl_filesystem_object_get_method_check(zend_object **object, zend_string *method, const zval *key) /* {{{ */ +static zend_function *spl_filesystem_object_get_method_check(zend_object **object, zend_string *method, const zval *key) /* {{{ */ { spl_filesystem_object *fsobj = spl_filesystem_from_obj(*object); @@ -711,7 +711,7 @@ zend_function *spl_filesystem_object_get_method_check(zend_object **object, zend #define DIT_CTOR_FLAGS 0x00000001 #define DIT_CTOR_GLOB 0x00000002 -void spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAMETERS, zend_long ctor_flags) /* {{{ */ +static void spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAMETERS, zend_long ctor_flags) /* {{{ */ { spl_filesystem_object *intern; zend_string *path; @@ -1637,7 +1637,7 @@ static const zend_object_iterator_funcs spl_filesystem_dir_it_funcs = { /* }}} */ /* {{{ spl_ce_dir_get_iterator */ -zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval *object, int by_ref) +static zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval *object, int by_ref) { spl_filesystem_iterator *iterator; spl_filesystem_object *dir_object; @@ -1830,7 +1830,7 @@ static const zend_object_iterator_funcs spl_filesystem_tree_it_funcs = { /* }}} */ /* {{{ spl_ce_dir_get_iterator */ -zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zval *object, int by_ref) +static zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zval *object, int by_ref) { spl_filesystem_iterator *iterator; spl_filesystem_object *dir_object; diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index a3c17d59668c0..176989936ed8f 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -1223,7 +1223,7 @@ static const zend_object_iterator_funcs spl_dllist_it_funcs = { NULL, /* get_gc */ }; /* }}} */ -zend_object_iterator *spl_dllist_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ +static zend_object_iterator *spl_dllist_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ { spl_dllist_object *dllist_object = Z_SPLDLLIST_P(object); diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 291744fce0d9f..e914b688df77f 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -927,7 +927,7 @@ static const zend_object_iterator_funcs spl_fixedarray_it_funcs = { NULL, /* get_gc */ }; -zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *object, int by_ref) +static zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *object, int by_ref) { spl_fixedarray_it *iterator; diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index 64fe962ee2de3..69a5a4fe6ef9e 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -1085,7 +1085,7 @@ static const zend_object_iterator_funcs spl_pqueue_it_funcs = { NULL, /* get_gc */ }; -zend_object_iterator *spl_heap_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ +static zend_object_iterator *spl_heap_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ { if (by_ref) { zend_throw_error(NULL, "An iterator cannot be used with foreach by reference"); @@ -1104,7 +1104,7 @@ zend_object_iterator *spl_heap_get_iterator(zend_class_entry *ce, zval *object, } /* }}} */ -zend_object_iterator *spl_pqueue_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ +static zend_object_iterator *spl_pqueue_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ { if (by_ref) { zend_throw_error(NULL, "An iterator cannot be used with foreach by reference"); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 39791039b1d83..344ebdf75752b 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -2901,7 +2901,7 @@ int spl_append_it_next_iterator(spl_dual_it_object *intern) /* {{{*/ } } /* }}} */ -void spl_append_it_fetch(spl_dual_it_object *intern) /* {{{*/ +static void spl_append_it_fetch(spl_dual_it_object *intern) /* {{{*/ { while (spl_dual_it_valid(intern) != SUCCESS) { intern->u.append.iterator->funcs->move_forward(intern->u.append.iterator); @@ -2912,7 +2912,7 @@ void spl_append_it_fetch(spl_dual_it_object *intern) /* {{{*/ spl_dual_it_fetch(intern, 0); } /* }}} */ -void spl_append_it_next(spl_dual_it_object *intern) /* {{{ */ +static void spl_append_it_next(spl_dual_it_object *intern) /* {{{ */ { if (spl_dual_it_valid(intern) == SUCCESS) { spl_dual_it_next(intern, 1); diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index ce7852618f875..b996764c1aca1 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -173,7 +173,7 @@ static spl_SplObjectStorageElement *spl_object_storage_attach_handle(spl_SplObje return pelement; } /* }}} */ -spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *intern, zend_object *obj, zval *inf) /* {{{ */ +static spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *intern, zend_object *obj, zval *inf) /* {{{ */ { if (EXPECTED(!(intern->flags & SOS_OVERRIDDEN_WRITE_DIMENSION))) { return spl_object_storage_attach_handle(intern, obj, inf); @@ -238,7 +238,7 @@ static zend_result spl_object_storage_detach(spl_SplObjectStorage *intern, zend_ return ret; } /* }}}*/ -void spl_object_storage_addall(spl_SplObjectStorage *intern, spl_SplObjectStorage *other) { /* {{{ */ +static void spl_object_storage_addall(spl_SplObjectStorage *intern, spl_SplObjectStorage *other) { /* {{{ */ spl_SplObjectStorageElement *element; ZEND_HASH_FOREACH_PTR(&other->storage, element) { @@ -406,7 +406,7 @@ static zend_object *spl_SplObjectStorage_new(zend_class_entry *class_type) /* }}} */ /* Returns true if the SplObjectStorage contains an entry for getHash(obj), even if the corresponding value is null. */ -bool spl_object_storage_contains(spl_SplObjectStorage *intern, zend_object *obj) /* {{{ */ +static bool spl_object_storage_contains(spl_SplObjectStorage *intern, zend_object *obj) /* {{{ */ { if (EXPECTED(!intern->fptr_get_hash)) { return zend_hash_index_find(&intern->storage, obj->handle) != NULL;