Skip to content

ext/spl: standardize the visibility of functions #10708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/spl/spl_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions ext/spl/spl_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ext/spl/spl_dllist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion ext/spl/spl_fixedarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions ext/spl/spl_heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions ext/spl/spl_iterators.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions ext/spl/spl_observer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down