/ext-ds/src/php/classes/ |
H A D | php_deque_ce.c | 88 PARSE_LONG_AND_OPTIONAL_ZVAL(index, length); in METHOD() 200 PARSE_LONG(index); in METHOD() 206 PARSE_LONG_AND_ZVAL(index, value); in METHOD() 207 ds_deque_set(THIS_DS_DEQUE(), index, value); in METHOD() 218 PARSE_LONG(index); in METHOD() 219 ds_deque_remove(THIS_DS_DEQUE(), index, return_value); in METHOD() 224 PARSE_LONG_AND_VARIADIC_ZVAL(index); in METHOD() 271 PARSE_LONG(index); in METHOD() 277 PARSE_LONG(index); in METHOD() 298 PARSE_LONG(index); in METHOD() [all …]
|
H A D | php_vector_ce.c | 93 PARSE_LONG(index); in METHOD() 94 RETURN_ZVAL_COPY(ds_vector_get(THIS_DS_VECTOR(), index)); in METHOD() 99 PARSE_LONG_AND_VARIADIC_ZVAL(index); in METHOD() 100 ds_vector_insert_va(THIS_DS_VECTOR(), index, argc, argv); in METHOD() 169 PARSE_LONG(index); in METHOD() 193 PARSE_LONG_AND_ZVAL(index, value); in METHOD() 194 ds_vector_set(THIS_DS_VECTOR(), index, value); in METHOD() 207 PARSE_LONG_AND_OPTIONAL_ZVAL(index, length); in METHOD() 271 PARSE_LONG(index); in METHOD() 277 PARSE_LONG(index); in METHOD() [all …]
|
H A D | php_sequence_ce.h | 52 ARGINFO_LONG( Sequence_get, index); 53 ARGINFO_LONG_VARIADIC_ZVAL( Sequence_insert, index, values); 64 ARGINFO_LONG( Sequence_remove, index); 68 ARGINFO_LONG_ZVAL( Sequence_set, index, value); 70 ARGINFO_LONG_OPTIONAL_LONG_RETURN_DS( Sequence_slice, index, length, Sequence);
|
H A D | php_set_ce.c | 63 PARSE_LONG(index); in METHOD() 64 RETURN_ZVAL_COPY(ds_set_get(THIS_DS_SET(), index)); in METHOD() 181 PARSE_LONG_AND_OPTIONAL_ZVAL(index, length); in METHOD() 187 RETURN_DS_SET(ds_set_slice(set, index, Z_LVAL_P(length))); in METHOD() 190 RETURN_DS_SET(ds_set_slice(set, index, DS_SET_SIZE(set))); in METHOD() 241 PARSE_LONG(index); in METHOD() 242 RETURN_ZVAL_COPY(ds_set_get(THIS_DS_SET(), index)); in METHOD()
|
H A D | php_set_ce.h | 16 ARGINFO_LONG( Set_get, index); 28 ARGINFO_LONG_OPTIONAL_LONG_RETURN_DS( Set_slice, index, length, Set);
|
H A D | php_map_ce.c | 249 PARSE_LONG_AND_OPTIONAL_ZVAL(index, length); in METHOD() 255 RETURN_DS_MAP(ds_map_slice(map, index, Z_LVAL_P(length))); in METHOD() 258 RETURN_DS_MAP(ds_map_slice(map, index, DS_MAP_SIZE(map))); in METHOD()
|
H A D | php_map_ce.h | 38 ARGINFO_LONG_OPTIONAL_LONG_RETURN_DS( Map_slice, index, length, Map);
|
/ext-ds/src/ds/ |
H A D | ds_deque.c | 100 if (index < 0 || index >= deque->size) { in ds_deque_valid_position() 331 if (index == 0) { in ds_deque_remove() 343 index = ds_deque_lookup_index(deque, index); in ds_deque_remove() 350 ds_deque_memmove(deque, index, index + 1, deque->tail - index); in ds_deque_remove() 405 zend_long index; in ds_deque_insert_va() local 454 ds_deque_memmove(deque, (index + argc), index, (deque->tail - index)); in ds_deque_insert_va() 479 zend_long index; in ds_deque_find_index() local 481 for (index = 0; index < deque->size; index++, head++) { in ds_deque_find_index() 483 return index; in ds_deque_find_index() 504 if (index >= 0) { in ds_deque_find() [all …]
|
H A D | ds_vector.c | 8 if (index < 0 || index >= max) { in index_out_of_range() 9 INDEX_OUT_OF_RANGE(index, max); in index_out_of_range() 110 if (index == vector->size - 1) { in ds_vector_remove() 114 zval *pos = vector->buffer + index; in ds_vector_remove() 137 return vector->buffer + index; in ds_vector_get() 217 if (index >= 0) { in ds_vector_find() 218 ZVAL_LONG(return_value, index); in ds_vector_find() 259 dst = vector->buffer + index; in ds_vector_insert_va() 261 len = vector->size - index; in ds_vector_insert_va() 353 if (index < 0 || index >= vector->size) { in ds_vector_isset() [all …]
|
H A D | ds_priority_queue.c | 96 uint32_t index; in ds_priority_queue_push() local 107 for (index = queue->size; index > 0; index = parent) { in ds_priority_queue_push() 110 parent = PARENT(index); in ds_priority_queue_push() 123 nodes[index] = nodes[parent]; in ds_priority_queue_push() 126 node = &queue->nodes[index]; in ds_priority_queue_push() 146 uint32_t index; in ds_priority_queue_pop() local 176 for (index = 0; index < half; index = swap) { in ds_priority_queue_pop() 177 swap = LEFT(index); in ds_priority_queue_pop() 189 nodes[index] = nodes[swap]; in ds_priority_queue_pop() 192 nodes[index] = bottom; in ds_priority_queue_pop()
|
H A D | ds_vector.h | 54 void ds_vector_set(ds_vector_t *vector, zend_long index, zval *value); 60 void ds_vector_remove(ds_vector_t *vector, zend_long index, zval *return_value); 62 void ds_vector_insert(ds_vector_t *vector, zend_long index, zval *value); 63 void ds_vector_insert_va(ds_vector_t *vector, zend_long index, VA_PARAMS); 75 zval *ds_vector_get(ds_vector_t *vector, zend_long index); 82 ds_vector_t *ds_vector_slice(ds_vector_t *vector, zend_long index, zend_long length); 101 bool ds_vector_index_exists(ds_vector_t *vector, zend_long index); 102 bool ds_vector_isset(ds_vector_t *vector, zend_long index, int check_empty);
|
H A D | ds_deque.h | 47 void ds_deque_set(ds_deque_t *deque, zend_long index, zval *value); 53 void ds_deque_remove(ds_deque_t *deque, zend_long index, zval *return_value); 54 void ds_deque_insert_va(ds_deque_t *deque, zend_long index, VA_PARAMS); 57 zval *ds_deque_get(ds_deque_t *deque, zend_long index); 64 bool ds_deque_isset(ds_deque_t *deque, zend_long index, int check_empty); 65 bool ds_deque_index_exists(ds_deque_t *deque, zend_long index); 70 ds_deque_t *ds_deque_slice(ds_deque_t *deque, zend_long index, zend_long length);
|
H A D | ds_htable.c | 56 uint32_t index = 0; in ds_htable_rehash() local 69 uint32_t j = index; in ds_htable_rehash() 345 uint32_t index; in ds_htable_lookup_bucket_by_hash() local 355 bucket = &table->buckets[index]; in ds_htable_lookup_bucket_by_hash() 382 uint32_t index; in ds_htable_lookup_by_position() local 389 index = table->min_deleted; in ds_htable_lookup_by_position() 391 index = 0; in ds_htable_lookup_by_position() 394 bucket = &table->buckets[index]; in ds_htable_lookup_by_position() 404 if (position == index) { in ds_htable_lookup_by_position() 408 index++; in ds_htable_lookup_by_position() [all …]
|
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() 302 uint32_t index; in add_ht_to_map() local 307 ZEND_HASH_FOREACH_KEY_VAL(ht, index, key, value) { in add_ht_to_map() 311 ZVAL_LONG(&temp, index); in add_ht_to_map()
|
H A D | ds_set.h | 35 zval *ds_set_get(ds_set_t *set, zend_long index); 39 ds_set_t *ds_set_slice(ds_set_t *set, zend_long index, zend_long length);
|
H A D | ds_set.c | 130 zval *ds_set_get(ds_set_t *set, zend_long index) in ds_set_get() argument 132 ds_htable_bucket_t *bucket = ds_htable_lookup_by_position(set->table, index); in ds_set_get() 138 INDEX_OUT_OF_RANGE(index, set->table->size); in ds_set_get() 172 ds_set_t *ds_set_slice(ds_set_t *set, zend_long index, zend_long length) in ds_set_slice() argument 174 return ds_set_ex(ds_htable_slice(set->table, index, length)); in ds_set_slice()
|
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);
|
/ext-ds/src/php/handlers/ |
H A D | php_vector_handlers.c | 93 zend_long index = 0; local 97 index = Z_LVAL_P(offset); 100 if (zend_parse_parameter(ZEND_PARSE_PARAMS_QUIET, 1, offset, "l", &index) == FAILURE) { 105 if (ds_vector_index_exists(vector, index)) { // to avoid OutOfBounds 106 ds_vector_remove(vector, index, NULL);
|
H A D | php_deque_handlers.c | 94 zend_long index = 0; local 98 index = Z_LVAL_P(offset); 101 if (zend_parse_parameter(ZEND_PARSE_PARAMS_QUIET, 1, offset, "l", &index) == FAILURE) { 106 if (ds_deque_index_exists(deque, index)) { 107 ds_deque_remove(deque, index, NULL);
|
/ext-ds/src/ |
H A D | common.c | 223 zend_long index; in ds_php_array_uses_keys() local 226 ZEND_HASH_FOREACH_KEY(ht, index, key) { in ds_php_array_uses_keys() 227 if (key || index != expected++) { in ds_php_array_uses_keys()
|
H A D | common.h | 179 #define INDEX_OUT_OF_RANGE(index, max) ds_throw_exception( \ argument 184 index, \
|