/ext-ds/src/ |
H A D | common.c | 24 zval *buffer, in ds_reallocate_zval_buffer() argument 30 return buffer; in ds_reallocate_zval_buffer() 38 DTOR_AND_UNDEF(&buffer[i]); in ds_reallocate_zval_buffer() 42 buffer = erealloc(buffer, length * sizeof(zval)); in ds_reallocate_zval_buffer() 49 return buffer; in ds_reallocate_zval_buffer() 161 smart_str_append(buffer, str); in smart_str_appendz() 166 zval *buffer, in ds_join_zval_buffer() argument 178 return zval_get_string(buffer); in ds_join_zval_buffer() 183 zval *pos = buffer; in ds_join_zval_buffer() 196 zval *pos = buffer; in ds_join_zval_buffer() [all …]
|
H A D | common.h | 155 *buffer = (unsigned char *) estrndup(ZSTR_VAL((s)), ZSTR_LEN((s))); \ 161 unsigned char **buffer, \ 168 const unsigned char *buffer, \ 271 zval *buffer, 300 zval *ds_reallocate_zval_buffer(zval *buffer, zend_long length, zend_long current, zend_long used); 305 void ds_sort_zval_buffer(zval *buffer, zend_long size); 310 void ds_user_sort_zval_buffer(zval *buffer, zend_long size); 340 void smart_str_appendz(smart_str *buffer, zval *value);
|
/ext-ds/src/ds/ |
H A D | ds_vector.c | 52 COPY_ZVAL_BUFFER(clone->buffer, vector->buffer, vector->size); in ds_vector_clone() 63 buffer = ds_reallocate_zval_buffer(buffer, DS_VECTOR_MIN_CAPACITY, capacity, size); in ds_vector_from_buffer() 67 vector->buffer = buffer; in ds_vector_from_buffer() 149 zval *pos = vector->buffer; in ds_vector_clear_buffer() 328 dst = vector->buffer; in ds_vector_unshift_va() 513 ds_reverse_zval_range(vector->buffer, vector->buffer + vector->size); in ds_vector_reverse() 555 zval *target = buffer; in ds_vector_map() 570 efree(buffer); in ds_vector_map() 599 return ds_vector_from_buffer(buffer, vector->size, (target - buffer)); in ds_vector_filter() 641 return ds_vector_from_buffer(buffer, vector->size, (target - buffer)); in ds_vector_filter_callback() [all …]
|
H A D | ds_deque.c | 35 memmove(&deque->buffer[dst], &deque->buffer[src], length * sizeof(zval)); in ds_deque_memmove() 73 deque->buffer = buffer; in ds_deque_from_buffer() 86 zval *target = buffer; in ds_deque_clone() 134 memcpy(&buffer[0], &deque->buffer[h], r * sizeof(zval)); in ds_deque_reset_head() 135 memcpy(&buffer[r], &deque->buffer[0], t * sizeof(zval)); in ds_deque_reset_head() 137 FREE_AND_REPLACE(deque->buffer, buffer); in ds_deque_reset_head() 208 efree(deque->buffer); in ds_deque_free() 536 SWAP_ZVAL(deque->buffer[deque->tail], deque->buffer[deque->head]); in ds_deque_rotate() 542 SWAP_ZVAL(deque->buffer[deque->tail], deque->buffer[deque->head]); in ds_deque_rotate() 702 zval *target = buffer; in ds_deque_map() [all …]
|
H A D | ds_vector.h | 7 zval *buffer; member 22 zval *x = v->buffer; \ 32 zval *y = v->buffer; \ 47 ds_vector_t *ds_vector_from_buffer(zval *buffer, zend_long capacity, zend_long size);
|
H A D | ds_queue.h | 44 int ds_queue_serialize(zval *object, unsigned char **buffer, size_t *length, zend_serialize_data *d… 45 int ds_queue_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t le…
|
H A D | ds_priority_queue.c | 246 ds_priority_queue_node_t *buffer = allocate_nodes(queue->size); in ds_priority_queue_create_sorted_buffer() local 248 memcpy(buffer, queue->nodes, queue->size * sizeof(ds_priority_queue_node_t)); in ds_priority_queue_create_sorted_buffer() 249 qsort(buffer, queue->size, sizeof(ds_priority_queue_node_t), priority_sort); in ds_priority_queue_create_sorted_buffer() 251 return buffer; in ds_priority_queue_create_sorted_buffer()
|
H A D | ds_htable.c | 223 smart_str buffer = {0}; in get_array_hash() local 226 php_var_serialize(&buffer, array, &var_hash); in get_array_hash() 229 smart_str_0(&buffer); in get_array_hash() 231 if (buffer.s) { in get_array_hash() 232 hash = get_string_hash(buffer.s); in get_array_hash() 233 zend_string_free(buffer.s); in get_array_hash() 716 zval *buffer = ds_allocate_zval_buffer(table->size); in ds_htable_values() local 717 zval *target = buffer; in ds_htable_values() 725 return buffer; in ds_htable_values() 1215 const unsigned char *pos = buffer; in ds_htable_unserialize() [all …]
|
H A D | ds_deque.h | 20 v = &_deque->buffer[(_head + _i) & _mask]; 27 zval *buffer; member
|
H A D | ds_stack.h | 16 zval *_end = _v->buffer; \
|
H A D | ds_htable.h | 213 int ds_htable_serialize(ds_htable_t *table, unsigned char **buffer, size_t *buf_len, zend_serialize… 214 int ds_htable_unserialize(ds_htable_t *table, const unsigned char *buffer, size_t length, zend_unse…
|
/ext-ds/src/php/handlers/ |
H A D | php_common_handlers.c | 15 smart_str buffer = {0}; local 17 smart_str_appendl(&buffer, "object(", 7); 18 smart_str_append (&buffer, ce->name); 19 smart_str_appendc(&buffer, ')'); 21 smart_str_0(&buffer); 22 ZVAL_STR(return_value, buffer.s);
|
H A D | php_stack_handlers.c | 79 *gc_data = (zval*) stack->vector->buffer;
|
H A D | php_queue_handlers.c | 79 *gc_data = deque->buffer;
|
H A D | php_vector_handlers.c | 159 *gc_data = vector->buffer;
|
/ext-ds/src/php/objects/ |
H A D | php_map.c | 53 zval *buffer = ds_allocate_zval_buffer(DS_MAP_SIZE(map)); in ds_map_pairs() local 54 zval *target = buffer; in ds_map_pairs() 64 return buffer; in ds_map_pairs() 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 int php_ds_map_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t … 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 int php_ds_queue_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_… in php_ds_queue_unserialize() argument 66 const unsigned char *pos = buffer; in php_ds_queue_unserialize() 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 int php_ds_deque_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_… in php_ds_deque_unserialize() argument 65 const unsigned char *pos = buffer; in php_ds_deque_unserialize() 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 int php_ds_stack_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_… in php_ds_stack_unserialize() argument 65 const unsigned char *pos = buffer; in php_ds_stack_unserialize() 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 int php_ds_vector_unserialize(zval *obj, zend_class_entry *ce, const unsigned char *buffer, size_t … in php_ds_vector_unserialize() argument 65 const unsigned char *pos = buffer; in php_ds_vector_unserialize() 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 int php_ds_set_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t … in php_ds_set_unserialize() argument 65 const unsigned char *pos = buffer; in php_ds_set_unserialize() 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 …eue_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t length, ze… in php_ds_priority_queue_unserialize() argument 75 const unsigned char *pos = buffer; in php_ds_priority_queue_unserialize() 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 int php_ds_pair_unserialize(zval *object, zend_class_entry *ce, const unsigned char *buffer, size_t… in php_ds_pair_unserialize() argument 131 const unsigned char *pos = buffer; in php_ds_pair_unserialize() 132 const unsigned char *max = buffer + length; in php_ds_pair_unserialize()
|
/ext-ds/ |
H A D | CHANGELOG.md | 21 - Fixed buffer outflow during deserialization of map objects. #132 @rado-h 29 - Fixed not clearing memory after buffer reallocation. #114
|
/ext-ds/src/php/iterators/ |
H A D | php_vector_iterator.c | 25 return &iterator->vector->buffer[iterator->position]; in php_ds_vector_iterator_get_current_data()
|