Go to the documentation of this file.
31 #include <ext/spl/spl_iterators.h>
32 #include <Zend/zend_API.h>
33 #include <Zend/zend_interfaces.h>
37 ZEND_BEGIN_ARG_INFO_EX(arginfo_offsetGet, 0, 0, 1)
38 ZEND_ARG_INFO(0,
index)
41 ZEND_BEGIN_ARG_INFO_EX(arginfo_offsetSet, 0, 0, 2)
42 ZEND_ARG_INFO(0,
index)
43 ZEND_ARG_INFO(0, newval)
46 ZEND_BEGIN_ARG_INFO(arginfo_void, 0)
52 PHP_ME(
RepeatedField, offsetExists, arginfo_offsetGet, ZEND_ACC_PUBLIC)
53 PHP_ME(
RepeatedField, offsetGet, arginfo_offsetGet, ZEND_ACC_PUBLIC)
54 PHP_ME(
RepeatedField, offsetSet, arginfo_offsetSet, ZEND_ACC_PUBLIC)
55 PHP_ME(
RepeatedField, offsetUnset, arginfo_offsetGet, ZEND_ACC_PUBLIC)
57 PHP_ME(
RepeatedField, getIterator, arginfo_void, ZEND_ACC_PUBLIC)
75 zval *
value TSRMLS_DC);
79 #if PHP_MAJOR_VERSION < 7
98 #if PHP_MAJOR_VERSION < 7
110 #if PHP_MAJOR_VERSION < 7
121 zend_ce_aggregate, spl_ce_Countable);
127 #if PHP_MAJOR_VERSION < 7
128 static inline void php_proto_array_string_release(
void *
value) {
129 zval_ptr_dtor(
value);
133 zval_ptr_dtor(
value);
138 static inline void php_proto_array_string_release(zval *
value) {
139 void* ptr = Z_PTR_P(
value);
140 zend_string*
object = *(zend_string**)ptr;
141 zend_string_release(
object);
145 zval_ptr_dtor(
value);
148 void* ptr = Z_PTR_P(
value);
161 php_proto_array_string_release, 0);
179 zval *
value TSRMLS_DC) {
198 if (!zend_hash_index_exists(ht,
index)) {
199 zend_error(E_USER_ERROR,
"Element at %llu doesn't exist.\n",
200 (
long long unsigned int)
index);
215 #if PHP_MAJOR_VERSION < 7
238 zend_error(E_USER_ERROR,
"Element at %d doesn't exist.\n",
index);
244 zend_error(E_USER_ERROR,
"Element at %d doesn't exist.\n",
index);
281 #if PHP_MAJOR_VERSION < 7
282 MAKE_STD_ZVAL(
intern->array);
305 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"l|C", &
type, &
klass) ==
314 #if PHP_MAJOR_VERSION < 7
315 MAKE_STD_ZVAL(
intern->array);
322 zend_error(E_USER_ERROR,
"Message type must have concrete class.");
336 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"z", &
value) ==
351 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"l", &
index) ==
358 RETURN_BOOL(
index >= 0 &&
374 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"l", &
index) ==
385 zend_error(E_USER_ERROR,
"Element at %ld doesn't exist.\n",
index);
391 zend_error(E_USER_ERROR,
"Element at %ld doesn't exist.\n",
index);
410 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"zz", &
index, &
value) ==
426 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"l", &
index) ==
436 zend_error(E_USER_ERROR,
"Cannot remove element at %ld.\n",
index);
451 if (zend_parse_parameters_none() == FAILURE) {
469 iter->repeated_field =
intern;
516 (
void **)&memory) == FAILURE) {
517 zend_error(E_USER_ERROR,
"Element at %d doesn't exist.\n",
index);
522 (
void **)&memory) == FAILURE) {
523 zend_error(E_USER_ERROR,
"Element at %d doesn't exist.\n",
index);
533 RETURN_LONG(
intern->position);
upb_fieldtype_t to_fieldtype(upb_descriptortype_t type)
#define PHP_PROTO_TSRMLS_DC
#define PHP_PROTO_TSRMLS_CC
#define CACHED_PTR_TO_ZVAL_PTR(VALUE)
static zend_function_entry repeated_field_methods[]
#define PHP_PROTO_INIT_CLASS_END
static void php_proto_array_object_release(void *value)
#define PHP_PROTO_ALLOC_ARRAY(zval_ptr)
bool protobuf_convert_to_uint64(zval *from, uint64_t *to)
void repeated_field_create_with_field(zend_class_entry *ce, const upb_fielddef *field, CACHED_VALUE *repeated_field PHP_PROTO_TSRMLS_DC)
#define PHP_PROTO_OBJECT_DTOR_START(classname, lowername)
#define php_proto_zend_hash_next_index_insert_zval(ht, pData)
#define php_proto_zend_hash_index_find_mem(ht, h, pDest)
size_t native_slot_size(upb_fieldtype_t type)
#define php_proto_zend_hash_index_update_mem(ht, h, pData, nDataSize, pDest)
#define php_proto_zend_hash_index_update_zval(ht, h, pData)
#define UNBOX(class_name, val)
static HashTable * repeated_field_get_gc(zval *object, CACHED_VALUE **table, int *n TSRMLS_DC)
zend_object_handlers * repeated_field_iter_handlers
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern repeated_field
#define PHP_PROTO_OBJECT_DTOR_END
const zend_class_entry * field_type_class(const upb_fielddef *field PHP_PROTO_TSRMLS_DC)
#define PHP_PROTO_HASH_OF(array)
php_proto_zval_ptr_dtor(intern->array)
static int repeated_field_has_dimension(zval *object, zval *offset TSRMLS_DC)
#define CACHED_TO_ZVAL_PTR(VALUE)
#define PHP_PROTO_OBJECT_CREATE_START(NAME, LOWWERNAME)
const FieldDescriptor * field
const SETUP_TEARDOWN_TESTCONTEXT char * key
#define PHP_PROTO_OBJECT_FREE_END
zend_class_entry * repeated_field_type
static zend_object_value repeated_field_create(zend_class_entry *ce TSRMLS_DC)
upb_fieldtype_t upb_fielddef_type(const upb_fielddef *f)
static zend_function_entry repeated_field_iter_methods[]
static zend_object_value repeated_field_iter_create(zend_class_entry *ce TSRMLS_DC)
void * repeated_field_index_native(RepeatedField *intern, int index TSRMLS_DC)
PHP_METHOD(RepeatedField, __construct)
void repeated_field_push_native(RepeatedField *intern, void *value)
ROSCPP_DECL std::string append(const std::string &left, const std::string &right)
#define NATIVE_SLOT_MAX_SIZE
bool native_slot_set_by_array(upb_fieldtype_t type, const zend_class_entry *klass, void *memory, zval *value TSRMLS_DC)
#define PHP_PROTO_OBJECT_CREATE_END(NAME, LOWWERNAME)
#define CREATE_OBJ_ON_ALLOCATED_ZVAL_PTR(zval_ptr, class_type)
struct RepeatedFieldIter RepeatedFieldIter
void repeated_field_create_with_type(zend_class_entry *ce, upb_fieldtype_t type, const zend_class_entry *msg_ce, CACHED_VALUE *repeated_field PHP_PROTO_TSRMLS_DC)
void native_slot_get_by_array(upb_fieldtype_t type, const void *memory, CACHED_VALUE *cache TSRMLS_DC)
static void php_proto_array_default_release(void *value)
static size_t next(const upb_table *t, size_t i)
GLsizei const GLfloat * value
upb_strtable_uninit & intern
#define php_proto_zend_hash_index_find_zval(ht, h, pDest)
#define ZVAL_PTR_TO_CACHED_PTR(VALUE)
zend_class_entry * repeated_field_iter_type
PHP_PROTO_INIT_CLASS_START("Google\\Protobuf\\Internal\\RepeatedField", RepeatedField, repeated_field)
zend_object_handlers * repeated_field_handlers
static void repeated_field_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC)
#define PHP_PROTO_OBJECT_FREE_START(classname, lowername)
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern array
static int repeated_field_array_init(zval *array, upb_fieldtype_t type, uint size ZEND_FILE_LINE_DC)
#define php_proto_zend_hash_next_index_insert_mem(ht, pData, nDataSize, pDest)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:48