38#define SPL_LLIST_RC(elem) Z_EXTRA((elem)->data)
40#define SPL_LLIST_DELREF(elem) if (!--SPL_LLIST_RC(elem)) { \
44#define SPL_LLIST_CHECK_DELREF_EX(elem, on_free) if ((elem) && !--SPL_LLIST_RC(elem)) { \
49#define SPL_LLIST_CHECK_DELREF(elem) SPL_LLIST_CHECK_DELREF_EX(elem, ;)
51#define SPL_LLIST_ADDREF(elem) SPL_LLIST_RC(elem)++
52#define SPL_LLIST_CHECK_ADDREF(elem) if (elem) SPL_LLIST_RC(elem)++
100#define Z_SPLDLLIST_P(zv) spl_dllist_from_obj(Z_OBJ_P((zv)))
282 spl_ptr_llist_push(to, &
current->data);
291static void spl_dllist_object_free_storage(
zend_object *
object)
300 spl_ptr_llist_pop(intern->
llist, &tmp);
303 spl_ptr_llist_destroy(intern->
llist);
328 intern->
llist = spl_ptr_llist_init();
329 spl_ptr_llist_copy(other->
llist, intern->
llist);
340 intern->
llist = spl_ptr_llist_init();
356 parent = parent->parent;
392 return spl_dllist_object_new_ex(class_type,
NULL, 0);
398 zend_object *new_object = spl_dllist_object_new_ex(old_object->
ce, old_object, 1);
412 zend_call_method_with_0_params(
object, intern->
std.
ce, &intern->
fptr_count,
"count", &
rv);
431 zval tmp, dllist_array;
433 HashTable *properties = zend_std_get_properties_ex(&intern->
std);
436 debug_info =
zend_new_array(zend_hash_num_elements(properties) + 2);
448 add_index_zval(&dllist_array, index, &
current->data);
470 zend_get_gc_buffer_add_zval(gc_buffer, &
current->data);
474 zend_get_gc_buffer_use(gc_buffer, gc_data, gc_data_count);
687 if (index < 0 || index >= intern->
llist->
count) {
693 if (element ==
NULL) {
705 bool index_is_null = 1;
722 if (index < 0 || index >= intern->
llist->
count) {
729 if (element !=
NULL) {
757 llist = intern->
llist;
759 if (index < 0 || index >= intern->
llist->
count) {
766 if (element !=
NULL) {
777 if (element == llist->
head) {
781 if (element == llist->
tail) {
818 *traverse_position_ptr = llist->
count-1;
819 *traverse_pointer_ptr = llist->
tail;
821 *traverse_position_ptr = 0;
822 *traverse_pointer_ptr = llist->
head;
831 if (*traverse_pointer_ptr) {
835 *traverse_pointer_ptr = old->
prev;
836 (*traverse_position_ptr)--;
840 spl_ptr_llist_pop(llist, &
prev);
845 *traverse_pointer_ptr = old->
next;
849 spl_ptr_llist_shift(llist, &
prev);
853 (*traverse_position_ptr)++;
891 return &element->
data;
1016 smart_str_appendc(&
buf,
':');
1041 const unsigned char *
p, *
s;
1054 spl_ptr_llist_pop(intern->
llist, &tmp);
1058 s =
p = (
const unsigned char*)
buf;
1078 spl_ptr_llist_push(intern->
llist, elem);
1131 zval *flags_zv, *storage_zv, *members_zv, *elem;
1140 if (!flags_zv || !storage_zv || !members_zv ||
1144 "Incomplete or ill-typed serialization data", 0);
1151 spl_ptr_llist_push(intern->
llist, elem);
1171 if (index < 0 || index > intern->
llist->
count) {
1190 elem->
next = element;
1199 element->
prev = elem;
1218 spl_dllist_it_valid,
1219 spl_dllist_it_get_current_data,
1220 spl_dllist_it_get_current_key,
1221 spl_dllist_it_move_forward,
1222 spl_dllist_it_rewind,
1248 return &iterator->
intern;
1264 spl_handler_SplDoublyLinkedList.clone_obj = spl_dllist_object_clone;
1265 spl_handler_SplDoublyLinkedList.count_elements = spl_dllist_object_count_elements;
1266 spl_handler_SplDoublyLinkedList.get_gc = spl_dllist_object_get_gc;
1267 spl_handler_SplDoublyLinkedList.free_obj = spl_dllist_object_free_storage;
prev(array|object &$array)
count(Countable|array $value, int $mode=COUNT_NORMAL)
zend_ffi_ctype_name_buf buf
#define PHP_MINIT_FUNCTION
unsigned const char * pos
struct php_pcntl_pending_signal * head
struct php_pcntl_pending_signal * tail
unsigned char key[REFLECTION_KEY_LEN]
#define PHP_VAR_UNSERIALIZE_DESTROY(d)
struct php_unserialize_data * php_unserialize_data_t
struct php_serialize_data * php_serialize_data_t
#define PHP_VAR_UNSERIALIZE_INIT(d)
PHPAPI zval * var_tmp_var(php_unserialize_data_t *var_hashx)
PHPAPI int php_var_unserialize(zval *rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash)
PHPAPI void var_push_dtor(php_unserialize_data_t *var_hash, zval *val)
#define PHP_VAR_SERIALIZE_INIT(d)
PHPAPI void php_var_serialize(smart_str *buf, zval *struc, php_serialize_data_t *data)
#define PHP_VAR_SERIALIZE_DESTROY(d)
php_unserialize_data_t var_hash
struct _spl_dllist_object spl_dllist_object
struct _spl_dllist_it spl_dllist_it
#define SPL_LLIST_CHECK_DELREF_EX(elem, on_free)
#define Z_SPLDLLIST_P(zv)
struct _spl_ptr_llist spl_ptr_llist
#define SPL_LLIST_RC(elem)
PHPAPI zend_class_entry * spl_ce_SplStack
struct _spl_ptr_llist_element spl_ptr_llist_element
#define SPL_LLIST_DELREF(elem)
PHPAPI zend_class_entry * spl_ce_SplDoublyLinkedList
PHPAPI zend_class_entry * spl_ce_SplQueue
#define SPL_LLIST_CHECK_DELREF(elem)
#define SPL_LLIST_CHECK_ADDREF(elem)
#define SPL_DLLIST_IT_FIX
#define SPL_DLLIST_IT_LIFO
#define SPL_DLLIST_IT_DELETE
#define SPL_DLLIST_IT_MASK
PHPAPI zend_class_entry * spl_ce_RuntimeException
PHPAPI zend_class_entry * spl_ce_UnexpectedValueException
PHPAPI zend_class_entry * spl_ce_OutOfRangeException
void spl_set_private_debug_info_property(const zend_class_entry *ce, const char *property, size_t property_len, HashTable *debug_info, zval *value)
zend_object_iterator intern
spl_ptr_llist_element * traverse_pointer
zend_function * fptr_offset_del
zend_function * fptr_offset_set
zend_class_entry * ce_get_iterator
zend_function * fptr_offset_get
zend_function * fptr_count
spl_ptr_llist_element * traverse_pointer
zend_function * fptr_offset_has
struct _spl_ptr_llist_element * prev
struct _spl_ptr_llist_element * next
spl_ptr_llist_element * tail
spl_ptr_llist_element * head
const zend_object_iterator_funcs * funcs
struct _zend_function::@236135173067030250234125302313220025134003177336 common
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
ZEND_API ZEND_COLD void zend_argument_error(zend_class_entry *error_ce, uint32_t arg_num, const char *format,...)
ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec,...)
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type)
ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
#define RETURN_COPY_DEREF(zv)
#define array_init_size(arg, size)
#define zend_parse_parameters_none()
ZEND_API ZEND_COLD zend_object * zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code)
ZEND_API ZEND_COLD zend_object * zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format,...)
union _zend_function zend_function
ZEND_API zend_get_gc_buffer * zend_get_gc_buffer_create(void)
ZEND_API HashTable *ZEND_FASTCALL zend_proptable_to_symtable(HashTable *ht, bool always_duplicate)
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData)
ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor)
ZEND_API zval *ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h)
#define zend_new_array(size)
#define ZEND_HASH_FOREACH_END()
#define ZEND_HASH_FOREACH_VAL(ht, _val)
ZEND_API zend_class_entry * zend_ce_countable
ZEND_API zend_class_entry * zend_ce_iterator
ZEND_API zend_class_entry * zend_ce_serializable
ZEND_API zend_class_entry * zend_ce_arrayaccess
ZEND_API void zend_iterator_init(zend_object_iterator *iter)
struct _zend_object_iterator zend_object_iterator
struct _zend_object_iterator_funcs zend_object_iterator_funcs
ZEND_API HashTable * zend_std_get_properties(zend_object *zobj)
ZEND_API const zend_object_handlers std_object_handlers
ZEND_API void ZEND_FASTCALL zend_objects_clone_members(zend_object *new_object, zend_object *old_object)
ZEND_API void ZEND_FASTCALL zend_object_std_init(zend_object *object, zend_class_entry *ce)
ZEND_API void zend_object_std_dtor(zend_object *object)
#define XtOffsetOf(s_type, field)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define Z_ISUNDEF_P(zval_p)
#define Z_ARRVAL_P(zval_p)
struct _zend_array HashTable
#define Z_REFCOUNTED(zval)
void(* copy_ctor_func_t)(zval *pElement)
#define ZVAL_OBJ_COPY(z, o)
ZEND_RESULT_CODE zend_result
struct _zend_object_handlers zend_object_handlers
#define ZVAL_COPY_VALUE(z, v)
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
ZEND_API void zval_add_ref(zval *p)
zend_refcounted * garbage