mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Move zend_object_iterator_funcs structures into read-only data segment
This commit is contained in:
parent
175e461369
commit
1db8402208
20 changed files with 25 additions and 25 deletions
|
@ -1165,7 +1165,7 @@ static void zend_generator_iterator_rewind(zend_object_iterator *iterator) /* {{
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
static zend_object_iterator_funcs zend_generator_iterator_functions = {
|
static const zend_object_iterator_funcs zend_generator_iterator_functions = {
|
||||||
zend_generator_iterator_dtor,
|
zend_generator_iterator_dtor,
|
||||||
zend_generator_iterator_valid,
|
zend_generator_iterator_valid,
|
||||||
zend_generator_iterator_get_data,
|
zend_generator_iterator_get_data,
|
||||||
|
|
|
@ -224,7 +224,7 @@ ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter)
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
zend_object_iterator_funcs zend_interface_iterator_funcs_iterator = {
|
static const zend_object_iterator_funcs zend_interface_iterator_funcs_iterator = {
|
||||||
zend_user_it_dtor,
|
zend_user_it_dtor,
|
||||||
zend_user_it_valid,
|
zend_user_it_valid,
|
||||||
zend_user_it_get_current_data,
|
zend_user_it_get_current_data,
|
||||||
|
|
|
@ -57,12 +57,12 @@ typedef struct _zend_object_iterator_funcs {
|
||||||
struct _zend_object_iterator {
|
struct _zend_object_iterator {
|
||||||
zend_object std;
|
zend_object std;
|
||||||
zval data;
|
zval data;
|
||||||
zend_object_iterator_funcs *funcs;
|
const zend_object_iterator_funcs *funcs;
|
||||||
zend_ulong index; /* private to fe_reset/fe_fetch opcodes */
|
zend_ulong index; /* private to fe_reset/fe_fetch opcodes */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _zend_class_iterator_funcs {
|
typedef struct _zend_class_iterator_funcs {
|
||||||
zend_object_iterator_funcs *funcs;
|
const zend_object_iterator_funcs *funcs;
|
||||||
union _zend_function *zf_new_iterator;
|
union _zend_function *zf_new_iterator;
|
||||||
union _zend_function *zf_valid;
|
union _zend_function *zf_valid;
|
||||||
union _zend_function *zf_current;
|
union _zend_function *zf_current;
|
||||||
|
|
|
@ -126,7 +126,7 @@ static int com_iter_move_forwards(zend_object_iterator *iter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static zend_object_iterator_funcs com_iter_funcs = {
|
static const zend_object_iterator_funcs com_iter_funcs = {
|
||||||
com_iter_dtor,
|
com_iter_dtor,
|
||||||
com_iter_valid,
|
com_iter_valid,
|
||||||
com_iter_get_data,
|
com_iter_get_data,
|
||||||
|
|
|
@ -525,7 +525,7 @@ static int saproxy_iter_move_forwards(zend_object_iterator *iter)
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static zend_object_iterator_funcs saproxy_iter_funcs = {
|
static const zend_object_iterator_funcs saproxy_iter_funcs = {
|
||||||
saproxy_iter_dtor,
|
saproxy_iter_dtor,
|
||||||
saproxy_iter_valid,
|
saproxy_iter_valid,
|
||||||
saproxy_iter_get_data,
|
saproxy_iter_get_data,
|
||||||
|
|
|
@ -1986,7 +1986,7 @@ static void date_period_it_rewind(zend_object_iterator *iter)
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* iterator handler table */
|
/* iterator handler table */
|
||||||
zend_object_iterator_funcs date_period_it_funcs = {
|
static const zend_object_iterator_funcs date_period_it_funcs = {
|
||||||
date_period_it_dtor,
|
date_period_it_dtor,
|
||||||
date_period_it_has_more,
|
date_period_it_has_more,
|
||||||
date_period_it_current_data,
|
date_period_it_current_data,
|
||||||
|
|
|
@ -243,7 +243,7 @@ err:
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
zend_object_iterator_funcs php_dom_iterator_funcs = {
|
static const zend_object_iterator_funcs php_dom_iterator_funcs = {
|
||||||
php_dom_iterator_dtor,
|
php_dom_iterator_dtor,
|
||||||
php_dom_iterator_valid,
|
php_dom_iterator_valid,
|
||||||
php_dom_iterator_current_data,
|
php_dom_iterator_current_data,
|
||||||
|
|
|
@ -80,7 +80,7 @@ static void _breakiterator_rewind(zend_object_iterator *iter)
|
||||||
ZVAL_LONG(&zoi_iter->current, (zend_long)pos);
|
ZVAL_LONG(&zoi_iter->current, (zend_long)pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static zend_object_iterator_funcs breakiterator_iterator_funcs = {
|
static const zend_object_iterator_funcs breakiterator_iterator_funcs = {
|
||||||
zoi_with_current_dtor,
|
zoi_with_current_dtor,
|
||||||
zoi_with_current_valid,
|
zoi_with_current_valid,
|
||||||
zoi_with_current_get_current_data,
|
zoi_with_current_get_current_data,
|
||||||
|
@ -197,7 +197,7 @@ static void _breakiterator_parts_rewind(zend_object_iterator *iter)
|
||||||
iter->funcs->move_forward(iter);
|
iter->funcs->move_forward(iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static zend_object_iterator_funcs breakiterator_parts_it_funcs = {
|
static const zend_object_iterator_funcs breakiterator_parts_it_funcs = {
|
||||||
zoi_with_current_dtor,
|
zoi_with_current_dtor,
|
||||||
zoi_with_current_valid,
|
zoi_with_current_valid,
|
||||||
zoi_with_current_get_current_data,
|
zoi_with_current_get_current_data,
|
||||||
|
|
|
@ -127,7 +127,7 @@ static void string_enum_destroy_it(zend_object_iterator *iter)
|
||||||
delete (StringEnumeration*)Z_PTR(iter->data);
|
delete (StringEnumeration*)Z_PTR(iter->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static zend_object_iterator_funcs string_enum_object_iterator_funcs = {
|
static const zend_object_iterator_funcs string_enum_object_iterator_funcs = {
|
||||||
zoi_with_current_dtor,
|
zoi_with_current_dtor,
|
||||||
zoi_with_current_valid,
|
zoi_with_current_valid,
|
||||||
zoi_with_current_get_current_data,
|
zoi_with_current_get_current_data,
|
||||||
|
|
|
@ -135,7 +135,7 @@ static void resourcebundle_iterator_reset( zend_object_iterator *iter )
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* {{{ resourcebundle_iterator_funcs */
|
/* {{{ resourcebundle_iterator_funcs */
|
||||||
static zend_object_iterator_funcs resourcebundle_iterator_funcs = {
|
static const zend_object_iterator_funcs resourcebundle_iterator_funcs = {
|
||||||
resourcebundle_iterator_dtor,
|
resourcebundle_iterator_dtor,
|
||||||
resourcebundle_iterator_has_more,
|
resourcebundle_iterator_has_more,
|
||||||
resourcebundle_iterator_current,
|
resourcebundle_iterator_current,
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "zend_interfaces.h"
|
#include "zend_interfaces.h"
|
||||||
|
|
||||||
|
|
||||||
extern zend_object_iterator_funcs php_mysqli_result_iterator_funcs;
|
extern const zend_object_iterator_funcs php_mysqli_result_iterator_funcs;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
zend_object_iterator intern;
|
zend_object_iterator intern;
|
||||||
|
@ -146,7 +146,7 @@ static void php_mysqli_result_iterator_current_key(zend_object_iterator *iter, z
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* {{{ php_mysqli_result_iterator_funcs */
|
/* {{{ php_mysqli_result_iterator_funcs */
|
||||||
zend_object_iterator_funcs php_mysqli_result_iterator_funcs = {
|
const zend_object_iterator_funcs php_mysqli_result_iterator_funcs = {
|
||||||
php_mysqli_result_iterator_dtor,
|
php_mysqli_result_iterator_dtor,
|
||||||
php_mysqli_result_iterator_valid,
|
php_mysqli_result_iterator_valid,
|
||||||
php_mysqli_result_iterator_current_data,
|
php_mysqli_result_iterator_current_data,
|
||||||
|
|
|
@ -211,7 +211,7 @@ extern void php_mysqli_dtor_p_elements(void *data);
|
||||||
|
|
||||||
extern void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status);
|
extern void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status);
|
||||||
|
|
||||||
extern zend_object_iterator_funcs php_mysqli_result_iterator_funcs;
|
extern const zend_object_iterator_funcs php_mysqli_result_iterator_funcs;
|
||||||
extern zend_object_iterator *php_mysqli_result_get_iterator(zend_class_entry *ce, zval *object, int by_ref);
|
extern zend_object_iterator *php_mysqli_result_get_iterator(zend_class_entry *ce, zval *object, int by_ref);
|
||||||
|
|
||||||
extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend_long fetchtype);
|
extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend_long fetchtype);
|
||||||
|
|
|
@ -2454,7 +2454,7 @@ static void pdo_stmt_iter_move_forwards(zend_object_iterator *iter)
|
||||||
I->key++;
|
I->key++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static zend_object_iterator_funcs pdo_stmt_iter_funcs = {
|
static const zend_object_iterator_funcs pdo_stmt_iter_funcs = {
|
||||||
pdo_stmt_iter_dtor,
|
pdo_stmt_iter_dtor,
|
||||||
pdo_stmt_iter_valid,
|
pdo_stmt_iter_valid,
|
||||||
pdo_stmt_iter_get_data,
|
pdo_stmt_iter_get_data,
|
||||||
|
|
|
@ -2335,7 +2335,7 @@ SXE_METHOD(__construct)
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
zend_object_iterator_funcs php_sxe_iterator_funcs = { /* {{{ */
|
static const zend_object_iterator_funcs php_sxe_iterator_funcs = { /* {{{ */
|
||||||
php_sxe_iterator_dtor,
|
php_sxe_iterator_dtor,
|
||||||
php_sxe_iterator_valid,
|
php_sxe_iterator_valid,
|
||||||
php_sxe_iterator_current_data,
|
php_sxe_iterator_current_data,
|
||||||
|
|
|
@ -1155,7 +1155,7 @@ static void spl_array_set_array(zval *object, spl_array_object *intern, zval *ar
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* iterator handler table */
|
/* iterator handler table */
|
||||||
zend_object_iterator_funcs spl_array_it_funcs = {
|
static const zend_object_iterator_funcs spl_array_it_funcs = {
|
||||||
spl_array_it_dtor,
|
spl_array_it_dtor,
|
||||||
spl_array_it_valid,
|
spl_array_it_valid,
|
||||||
spl_array_it_get_current_data,
|
spl_array_it_get_current_data,
|
||||||
|
|
|
@ -1621,7 +1621,7 @@ static void spl_filesystem_dir_it_move_forward(zend_object_iterator *iter);
|
||||||
static void spl_filesystem_dir_it_rewind(zend_object_iterator *iter);
|
static void spl_filesystem_dir_it_rewind(zend_object_iterator *iter);
|
||||||
|
|
||||||
/* iterator handler table */
|
/* iterator handler table */
|
||||||
zend_object_iterator_funcs spl_filesystem_dir_it_funcs = {
|
static const zend_object_iterator_funcs spl_filesystem_dir_it_funcs = {
|
||||||
spl_filesystem_dir_it_dtor,
|
spl_filesystem_dir_it_dtor,
|
||||||
spl_filesystem_dir_it_valid,
|
spl_filesystem_dir_it_valid,
|
||||||
spl_filesystem_dir_it_current_data,
|
spl_filesystem_dir_it_current_data,
|
||||||
|
@ -1820,7 +1820,7 @@ static void spl_filesystem_tree_it_rewind(zend_object_iterator *iter)
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* {{{ iterator handler table */
|
/* {{{ iterator handler table */
|
||||||
zend_object_iterator_funcs spl_filesystem_tree_it_funcs = {
|
static const zend_object_iterator_funcs spl_filesystem_tree_it_funcs = {
|
||||||
spl_filesystem_tree_it_dtor,
|
spl_filesystem_tree_it_dtor,
|
||||||
spl_filesystem_dir_it_valid,
|
spl_filesystem_dir_it_valid,
|
||||||
spl_filesystem_tree_it_current_data,
|
spl_filesystem_tree_it_current_data,
|
||||||
|
|
|
@ -1282,7 +1282,7 @@ SPL_METHOD(SplDoublyLinkedList, add)
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/* {{{ iterator handler table */
|
/* {{{ iterator handler table */
|
||||||
zend_object_iterator_funcs spl_dllist_it_funcs = {
|
static const zend_object_iterator_funcs spl_dllist_it_funcs = {
|
||||||
spl_dllist_it_dtor,
|
spl_dllist_it_dtor,
|
||||||
spl_dllist_it_valid,
|
spl_dllist_it_valid,
|
||||||
spl_dllist_it_get_current_data,
|
spl_dllist_it_get_current_data,
|
||||||
|
|
|
@ -995,7 +995,7 @@ SPL_METHOD(SplFixedArray, current)
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* iterator handler table */
|
/* iterator handler table */
|
||||||
zend_object_iterator_funcs spl_fixedarray_it_funcs = {
|
static const zend_object_iterator_funcs spl_fixedarray_it_funcs = {
|
||||||
spl_fixedarray_it_dtor,
|
spl_fixedarray_it_dtor,
|
||||||
spl_fixedarray_it_valid,
|
spl_fixedarray_it_valid,
|
||||||
spl_fixedarray_it_get_current_data,
|
spl_fixedarray_it_get_current_data,
|
||||||
|
|
|
@ -1060,7 +1060,7 @@ SPL_METHOD(SplPriorityQueue, current)
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* iterator handler table */
|
/* iterator handler table */
|
||||||
zend_object_iterator_funcs spl_heap_it_funcs = {
|
static const zend_object_iterator_funcs spl_heap_it_funcs = {
|
||||||
spl_heap_it_dtor,
|
spl_heap_it_dtor,
|
||||||
spl_heap_it_valid,
|
spl_heap_it_valid,
|
||||||
spl_heap_it_get_current_data,
|
spl_heap_it_get_current_data,
|
||||||
|
@ -1070,7 +1070,7 @@ zend_object_iterator_funcs spl_heap_it_funcs = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
zend_object_iterator_funcs spl_pqueue_it_funcs = {
|
static const zend_object_iterator_funcs spl_pqueue_it_funcs = {
|
||||||
spl_heap_it_dtor,
|
spl_heap_it_dtor,
|
||||||
spl_heap_it_valid,
|
spl_heap_it_valid,
|
||||||
spl_pqueue_it_get_current_data,
|
spl_pqueue_it_get_current_data,
|
||||||
|
|
|
@ -465,7 +465,7 @@ static zend_object_iterator *spl_recursive_it_get_iterator(zend_class_entry *ce,
|
||||||
return (zend_object_iterator*)iterator;
|
return (zend_object_iterator*)iterator;
|
||||||
}
|
}
|
||||||
|
|
||||||
zend_object_iterator_funcs spl_recursive_it_iterator_funcs = {
|
static const zend_object_iterator_funcs spl_recursive_it_iterator_funcs = {
|
||||||
spl_recursive_it_dtor,
|
spl_recursive_it_dtor,
|
||||||
spl_recursive_it_valid,
|
spl_recursive_it_valid,
|
||||||
spl_recursive_it_get_current_data,
|
spl_recursive_it_get_current_data,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue