/ext-ds/src/ |
H A D | common.c | 3 zval *ds_allocate_zval_buffer(zend_long length) in ds_allocate_zval_buffer() argument 5 return ecalloc(length, sizeof(zval)); in ds_allocate_zval_buffer() 25 zend_long length, in ds_reallocate_zval_buffer() argument 29 if (length == current) { in ds_reallocate_zval_buffer() 34 if (length < used) { in ds_reallocate_zval_buffer() 37 for (i = length; i < used; i++) { in ds_reallocate_zval_buffer() 45 if (length > current) { in ds_reallocate_zval_buffer() 116 zend_long *length, in ds_normalize_slice_args() argument 120 zend_long len = *length; in ds_normalize_slice_args() 125 *length = 0; in ds_normalize_slice_args() [all …]
|
H A D | common.h | 156 *length = ZSTR_LEN((s)); 162 size_t *length, \ 169 size_t length, \ 284 zend_long *length, 291 zval *ds_allocate_zval_buffer(zend_long length); 300 zval *ds_reallocate_zval_buffer(zval *buffer, zend_long length, zend_long current, zend_long used);
|
/ext-ds/src/php/objects/ |
H A D | php_map.c | 67 int php_ds_map_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_data … in php_ds_map_serialize() argument 69 return ds_htable_serialize(Z_DS_MAP_P(object)->table, buffer, length, data); in php_ds_map_serialize() 72 …(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_… in php_ds_map_unserialize() argument 76 if (ds_htable_unserialize(map->table, buffer, length, data) == FAILURE) { in php_ds_map_unserialize()
|
H A D | php_queue.c | 31 int php_ds_queue_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_dat… in php_ds_queue_serialize() argument 60 …(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_… in php_ds_queue_unserialize() argument 67 const unsigned char *end = buffer + length; in php_ds_queue_unserialize()
|
H A D | php_deque.c | 30 int php_ds_deque_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_dat… in php_ds_deque_serialize() argument 59 …(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_… in php_ds_deque_unserialize() argument 66 const unsigned char *end = buffer + length; in php_ds_deque_unserialize()
|
H A D | php_stack.c | 30 int php_ds_stack_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_dat… in php_ds_stack_serialize() argument 59 …(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_… in php_ds_stack_unserialize() argument 66 const unsigned char *end = buffer + length; in php_ds_stack_unserialize()
|
H A D | php_vector.c | 31 int php_ds_vector_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_da… in php_ds_vector_serialize() argument 59 …ize(zval *obj, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_… in php_ds_vector_unserialize() argument 66 const unsigned char *end = buffer + length; in php_ds_vector_unserialize()
|
H A D | php_set.c | 30 int php_ds_set_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_data … in php_ds_set_serialize() argument 59 …(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_… in php_ds_set_unserialize() argument 66 const unsigned char *end = buffer + length; in php_ds_set_unserialize()
|
H A D | php_priority_queue.c | 36 int php_ds_priority_queue_serialize(zval *object, unsigned char **buffer, size_t *length, zend_seri… in php_ds_priority_queue_serialize() argument 69 …(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_… in php_ds_priority_queue_unserialize() argument 76 const unsigned char *end = buffer + length; in php_ds_priority_queue_unserialize()
|
H A D | php_pair.c | 102 int php_ds_pair_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_data… in php_ds_pair_serialize() argument 126 …(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_… in php_ds_pair_unserialize() argument 132 const unsigned char *max = buffer + length; in php_ds_pair_unserialize()
|
/ext-ds/src/ds/ |
H A D | ds_queue.h | 44 int ds_queue_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_data *d… 45 …(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, zend_unserialize_…
|
H A D | ds_htable.c | 856 ds_htable_t *ds_htable_slice(ds_htable_t *table, zend_long index, zend_long length) in ds_htable_slice() argument 858 ds_normalize_slice_args(&index, &length, table->size); in ds_htable_slice() 860 if (length == 0) { in ds_htable_slice() 864 ds_htable_t *slice = ds_htable_with_capacity(length); in ds_htable_slice() 872 ((uint32_t) (index + length)) <= table->min_deleted) { in ds_htable_slice() 876 for (; length-- > 0; src++) { in ds_htable_slice() 892 if (--length == 0) { in ds_htable_slice() 916 for (; length > 0; src++) { in ds_htable_slice() 924 length--; in ds_htable_slice() 1182 int ds_htable_serialize(ds_htable_t *table, unsigned char **buffer, size_t *length, zend_serialize_… in ds_htable_serialize() argument [all …]
|
H A D | ds_deque.c | 33 zend_long length in ds_deque_memmove() argument 35 memmove(&deque->buffer[dst], &deque->buffer[src], length * sizeof(zval)); in ds_deque_memmove() 826 ds_deque_t *ds_deque_slice(ds_deque_t *deque, zend_long index, zend_long length) in ds_deque_slice() argument 828 ds_normalize_slice_args(&index, &length, deque->size); in ds_deque_slice() 830 if (length == 0) { in ds_deque_slice() 834 ds_deque_t *result = ds_deque_preallocated(length); in ds_deque_slice() 836 for (; length > 0; length--) { in ds_deque_slice()
|
H A D | ds_vector.c | 677 ds_vector_t *ds_vector_slice(ds_vector_t *vector, zend_long index, zend_long length) in ds_vector_slice() argument 679 ds_normalize_slice_args(&index, &length, vector->size); in ds_vector_slice() 681 if (length == 0) { in ds_vector_slice() 685 zend_long capacity = MAX(length, DS_VECTOR_MIN_CAPACITY); in ds_vector_slice() 689 zval *end = vector->buffer + index + length; in ds_vector_slice() 696 return ds_vector_from_buffer(buf, capacity, length); in ds_vector_slice()
|
H A D | ds_set.h | 39 ds_set_t *ds_set_slice(ds_set_t *set, zend_long index, zend_long length);
|
H A D | ds_map.h | 38 ds_map_t *ds_map_slice(ds_map_t *map, zend_long index, zend_long length);
|
H A D | ds_htable.h | 187 ds_htable_t *ds_htable_slice(ds_htable_t *table, zend_long index, zend_long length); 214 int ds_htable_unserialize(ds_htable_t *table, const unsigned char *buffer, size_t length, zend_unse…
|
H A D | ds_map.c | 210 ds_map_t *ds_map_slice(ds_map_t *map, zend_long index, zend_long length) in ds_map_slice() argument 212 return ds_map_ex(ds_htable_slice(map->table, index, length)); in ds_map_slice()
|
/ext-ds/src/php/classes/ |
H A D | php_deque_ce.c | 88 PARSE_LONG_AND_OPTIONAL_ZVAL(index, length); in METHOD() 90 if (ZEND_NUM_ARGS() > 1 && Z_TYPE_P(length) != IS_NULL) { in METHOD() 91 if (Z_TYPE_P(length) != IS_LONG) { in METHOD() 92 INTEGER_LENGTH_REQUIRED(length); in METHOD() 94 RETURN_DS_DEQUE(ds_deque_slice(deque, index, Z_LVAL_P(length))); in METHOD()
|
H A D | php_vector_ce.c | 207 PARSE_LONG_AND_OPTIONAL_ZVAL(index, length); in METHOD() 209 if (ZEND_NUM_ARGS() > 1 && Z_TYPE_P(length) != IS_NULL) { in METHOD() 210 if (Z_TYPE_P(length) != IS_LONG) { in METHOD() 211 INTEGER_LENGTH_REQUIRED(length); in METHOD() 213 RETURN_DS_VECTOR(ds_vector_slice(vector, index, Z_LVAL_P(length))); in METHOD()
|
H A D | php_set_ce.c | 181 PARSE_LONG_AND_OPTIONAL_ZVAL(index, length); in METHOD() 183 if (ZEND_NUM_ARGS() > 1 && Z_TYPE_P(length) != IS_NULL) { in METHOD() 184 if (Z_TYPE_P(length) != IS_LONG) { in METHOD() 185 INTEGER_LENGTH_REQUIRED(length); in METHOD() 187 RETURN_DS_SET(ds_set_slice(set, index, Z_LVAL_P(length))); in METHOD()
|
H A D | php_map_ce.c | 249 PARSE_LONG_AND_OPTIONAL_ZVAL(index, length); in METHOD() 251 if (ZEND_NUM_ARGS() > 1 && Z_TYPE_P(length) != IS_NULL) { in METHOD() 252 if (Z_TYPE_P(length) != IS_LONG) { in METHOD() 253 INTEGER_LENGTH_REQUIRED(length); in METHOD() 255 RETURN_DS_MAP(ds_map_slice(map, index, Z_LVAL_P(length))); in METHOD()
|
H A D | php_set_ce.h | 28 ARGINFO_LONG_OPTIONAL_LONG_RETURN_DS( Set_slice, index, length, Set);
|
H A D | php_map_ce.h | 38 ARGINFO_LONG_OPTIONAL_LONG_RETURN_DS( Map_slice, index, length, Map);
|
H A D | php_sequence_ce.h | 70 ARGINFO_LONG_OPTIONAL_LONG_RETURN_DS( Sequence_slice, index, length, Sequence);
|