Skip to content

Commit f3cea21

Browse files
committed
wip
1 parent b67095c commit f3cea21

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

ext/spl/spl_vector.stub.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ final class Vector implements IteratorAggregate, Countable, JsonSerializable, Ar
1717
/**
1818
* Construct a Vector from an iterable.
1919
*
20-
* When $preserveKeys is false, the values will be reindexed without gaps starting from 0
21-
* When $preserveKeys is true, any gaps in the keys of the iterable will be filled in with null,
22-
* and negative indices or non-integer indices will be rejected and cause an Exception.
20+
* The keys will be ignored, and values will be reindexed without gaps starting from 0
2321
*/
24-
public function __construct(iterable $iterator = [], bool $preserveKeys = true) {}
22+
public function __construct(iterable $iterator = []) {}
2523
/**
2624
* Returns an iterator that will return the indexes and values of iterable until index >= count()
2725
*/

ext/spl/spl_vector_arginfo.h

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 67a8a475004563eb10b9c117d32b864c94c13c38 */
2+
* Stub hash: 92769a3b5fa4af0222ab47445b174406288c303d */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Vector___construct, 0, 0, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, iterator, IS_ITERABLE, 0, "[]")
6-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preserveKeys, _IS_BOOL, 0, "true")
76
ZEND_END_ARG_INFO()
87

98
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Vector_getIterator, 0, 0, InternalIterator, 0)
@@ -12,15 +11,14 @@ ZEND_END_ARG_INFO()
1211
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_count, 0, 0, IS_LONG, 0)
1312
ZEND_END_ARG_INFO()
1413

15-
#define arginfo_class_Vector_capacity arginfo_class_Vector_count
16-
1714
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_shrinkToFit, 0, 0, IS_VOID, 0)
1815
ZEND_END_ARG_INFO()
1916

2017
#define arginfo_class_Vector_clear arginfo_class_Vector_shrinkToFit
2118

2219
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_setSize, 0, 1, IS_VOID, 0)
2320
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
21+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_MIXED, 0, "null")
2422
ZEND_END_ARG_INFO()
2523

2624
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector___serialize, 0, 0, IS_ARRAY, 0)
@@ -34,20 +32,20 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Vector___set_state, 0, 1, V
3432
ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0)
3533
ZEND_END_ARG_INFO()
3634

37-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_push, 0, 1, IS_VOID, 0)
38-
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
35+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_push, 0, 0, IS_VOID, 0)
36+
ZEND_ARG_VARIADIC_TYPE_INFO(0, values, IS_MIXED, 0)
3937
ZEND_END_ARG_INFO()
4038

4139
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_pop, 0, 0, IS_MIXED, 0)
4240
ZEND_END_ARG_INFO()
4341

4442
#define arginfo_class_Vector_toArray arginfo_class_Vector___serialize
4543

46-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_valueAt, 0, 1, IS_MIXED, 0)
44+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_get, 0, 1, IS_MIXED, 0)
4745
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
4846
ZEND_END_ARG_INFO()
4947

50-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_setValueAt, 0, 2, IS_VOID, 0)
48+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_set, 0, 2, IS_VOID, 0)
5149
ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
5250
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
5351
ZEND_END_ARG_INFO()
@@ -69,7 +67,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_offsetUnset, 0, 1,
6967
ZEND_ARG_TYPE_INFO(0, offset, IS_MIXED, 0)
7068
ZEND_END_ARG_INFO()
7169

72-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Vector_indexOf, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
70+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Vector_indexOf, 0, 1, IS_LONG, 1)
7371
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
7472
ZEND_END_ARG_INFO()
7573

@@ -91,7 +89,6 @@ ZEND_END_ARG_INFO()
9189
ZEND_METHOD(Vector, __construct);
9290
ZEND_METHOD(Vector, getIterator);
9391
ZEND_METHOD(Vector, count);
94-
ZEND_METHOD(Vector, capacity);
9592
ZEND_METHOD(Vector, shrinkToFit);
9693
ZEND_METHOD(Vector, clear);
9794
ZEND_METHOD(Vector, setSize);
@@ -101,8 +98,8 @@ ZEND_METHOD(Vector, __set_state);
10198
ZEND_METHOD(Vector, push);
10299
ZEND_METHOD(Vector, pop);
103100
ZEND_METHOD(Vector, toArray);
104-
ZEND_METHOD(Vector, valueAt);
105-
ZEND_METHOD(Vector, setValueAt);
101+
ZEND_METHOD(Vector, get);
102+
ZEND_METHOD(Vector, set);
106103
ZEND_METHOD(Vector, offsetGet);
107104
ZEND_METHOD(Vector, offsetExists);
108105
ZEND_METHOD(Vector, offsetSet);
@@ -118,7 +115,6 @@ static const zend_function_entry class_Vector_methods[] = {
118115
ZEND_ME(Vector, __construct, arginfo_class_Vector___construct, ZEND_ACC_PUBLIC)
119116
ZEND_ME(Vector, getIterator, arginfo_class_Vector_getIterator, ZEND_ACC_PUBLIC)
120117
ZEND_ME(Vector, count, arginfo_class_Vector_count, ZEND_ACC_PUBLIC)
121-
ZEND_ME(Vector, capacity, arginfo_class_Vector_capacity, ZEND_ACC_PUBLIC)
122118
ZEND_ME(Vector, shrinkToFit, arginfo_class_Vector_shrinkToFit, ZEND_ACC_PUBLIC)
123119
ZEND_ME(Vector, clear, arginfo_class_Vector_clear, ZEND_ACC_PUBLIC)
124120
ZEND_ME(Vector, setSize, arginfo_class_Vector_setSize, ZEND_ACC_PUBLIC)
@@ -128,8 +124,8 @@ static const zend_function_entry class_Vector_methods[] = {
128124
ZEND_ME(Vector, push, arginfo_class_Vector_push, ZEND_ACC_PUBLIC)
129125
ZEND_ME(Vector, pop, arginfo_class_Vector_pop, ZEND_ACC_PUBLIC)
130126
ZEND_ME(Vector, toArray, arginfo_class_Vector_toArray, ZEND_ACC_PUBLIC)
131-
ZEND_ME(Vector, valueAt, arginfo_class_Vector_valueAt, ZEND_ACC_PUBLIC)
132-
ZEND_ME(Vector, setValueAt, arginfo_class_Vector_setValueAt, ZEND_ACC_PUBLIC)
127+
ZEND_ME(Vector, get, arginfo_class_Vector_get, ZEND_ACC_PUBLIC)
128+
ZEND_ME(Vector, set, arginfo_class_Vector_set, ZEND_ACC_PUBLIC)
133129
ZEND_ME(Vector, offsetGet, arginfo_class_Vector_offsetGet, ZEND_ACC_PUBLIC)
134130
ZEND_ME(Vector, offsetExists, arginfo_class_Vector_offsetExists, ZEND_ACC_PUBLIC)
135131
ZEND_ME(Vector, offsetSet, arginfo_class_Vector_offsetSet, ZEND_ACC_PUBLIC)

0 commit comments

Comments
 (0)