Macros | Functions | Variables
php/ext/google/protobuf/map.c File Reference
#include <ext/spl/spl_iterators.h>
#include <Zend/zend_API.h>
#include <Zend/zend_interfaces.h>
#include "protobuf.h"
#include "utf8.h"
Include dependency graph for php/ext/google/protobuf/map.c:

Go to the source code of this file.

Macros

#define CASE_TYPE(upb_type, type, c_type, php_type)
 
#define TABLE_KEY_BUF_LENGTH   8
 

Functions

 for (map_begin_internal(intern, &it);!map_done(&it);map_next(&it))
 
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END if (!upb_strtable_init(&intern->table, UPB_CTYPE_UINT64))
 
void map_begin (zval *map_php, MapIter *iter TSRMLS_DC)
 
static void map_begin_internal (Map *map, MapIter *iter)
 
bool map_done (MapIter *iter)
 
void map_field_create_with_type (const zend_class_entry *ce, upb_fieldtype_t key_type, upb_fieldtype_t value_type, const zend_class_entry *msg_ce, CACHED_VALUE *map_field PHP_PROTO_TSRMLS_DC)
 
static HashTable * map_field_get_gc (zval *object, CACHED_VALUE **table, int *n TSRMLS_DC)
 
static bool map_field_read_dimension (zval *object, zval *key, int type, CACHED_VALUE *retval TSRMLS_DC)
 
static bool map_field_unset_dimension (zval *object, zval *key TSRMLS_DC)
 
static void map_field_write_dimension (zval *object, zval *key, zval *value TSRMLS_DC)
 
bool map_index_set (Map *intern, const char *keyval, int length, upb_value v)
 
static void map_index_unset (Map *intern, const char *keyval, int length)
 
const char * map_iter_key (MapIter *iter, int *len)
 
upb_value map_iter_value (MapIter *iter, int *len)
 
void map_next (MapIter *iter)
 
 PHP_METHOD (MapField, __construct)
 
 PHP_METHOD (MapField, count)
 
 PHP_METHOD (MapField, getIterator)
 
 PHP_METHOD (MapField, offsetExists)
 
 PHP_METHOD (MapField, offsetGet)
 
 PHP_METHOD (MapField, offsetSet)
 
 PHP_METHOD (MapField, offsetUnset)
 
 PHP_METHOD (MapFieldIter, current)
 
 PHP_METHOD (MapFieldIter, key)
 
 PHP_METHOD (MapFieldIter, next)
 
 PHP_METHOD (MapFieldIter, valid)
 
 PHP_PROTO_INIT_CLASS_START ("Google\\Protobuf\\Internal\\MapField", Map, map_field)
 
 PHP_PROTO_INIT_CLASS_START ("Google\\Protobuf\\Internal\\MapFieldIter", MapIter, map_field_iter)
 
static void php_proto_map_object_release (void *value)
 
static void php_proto_map_string_release (void *value)
 
static bool table_key (Map *self, zval *key, char *buf, const char **out_key, size_t *out_length TSRMLS_DC)
 
voidupb_value_memory (upb_value *v)
 

Variables

upb_strtable_uninitintern
 
MapIter it
 
int len
 
zend_object_handlers * map_field_handlers
 
zend_object_handlers * map_field_iter_handlers
 
static zend_function_entry map_field_iter_methods []
 
zend_class_entry * map_field_iter_type
 
static zend_function_entry map_field_methods []
 
zend_class_entry * map_field_type
 
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern self = NULL
 

Macro Definition Documentation

◆ CASE_TYPE

#define CASE_TYPE (   upb_type,
  type,
  c_type,
  php_type 
)
Value:
case UPB_TYPE_##upb_type: { \
c_type type##_value; \
if (!protobuf_convert_to_##type(key, &type##_value)) { \
return false; \
} \
native_slot_set_by_array(self->key_type, NULL, buf, key TSRMLS_CC); \
*out_key = buf; \
*out_length = native_slot_size(self->key_type); \
break; \
}

◆ TABLE_KEY_BUF_LENGTH

#define TABLE_KEY_BUF_LENGTH   8

Definition at line 88 of file php/ext/google/protobuf/map.c.

Function Documentation

◆ for()

Definition at line 207 of file php/ext/google/protobuf/map.c.

◆ if()

Definition at line 232 of file php/ext/google/protobuf/map.c.

◆ map_begin()

void map_begin ( zval *  map_php,
MapIter *iter  TSRMLS_DC 
)

Definition at line 495 of file php/ext/google/protobuf/map.c.

◆ map_begin_internal()

static void map_begin_internal ( Map map,
MapIter iter 
)
static

Definition at line 165 of file php/ext/google/protobuf/map.c.

◆ map_done()

bool map_done ( MapIter iter)

Definition at line 504 of file php/ext/google/protobuf/map.c.

◆ map_field_create_with_type()

void map_field_create_with_type ( const zend_class_entry *  ce,
upb_fieldtype_t  key_type,
upb_fieldtype_t  value_type,
const zend_class_entry *  msg_ce,
CACHED_VALUE *map_field  PHP_PROTO_TSRMLS_DC 
)

Definition at line 256 of file php/ext/google/protobuf/map.c.

◆ map_field_get_gc()

static HashTable* map_field_get_gc ( zval *  object,
CACHED_VALUE **  table,
int *n  TSRMLS_DC 
)
static

Definition at line 170 of file php/ext/google/protobuf/map.c.

◆ map_field_read_dimension()

static bool map_field_read_dimension ( zval *  object,
zval *  key,
int  type,
CACHED_VALUE *retval  TSRMLS_DC 
)
static

Definition at line 273 of file php/ext/google/protobuf/map.c.

◆ map_field_unset_dimension()

static bool map_field_unset_dimension ( zval *  object,
zval *key  TSRMLS_DC 
)
static

Definition at line 368 of file php/ext/google/protobuf/map.c.

◆ map_field_write_dimension()

static void map_field_write_dimension ( zval *  object,
zval *  key,
zval *value  TSRMLS_DC 
)
static

Definition at line 342 of file php/ext/google/protobuf/map.c.

◆ map_index_set()

bool map_index_set ( Map intern,
const char *  keyval,
int  length,
upb_value  v 
)

Definition at line 330 of file php/ext/google/protobuf/map.c.

◆ map_index_unset()

static void map_index_unset ( Map intern,
const char *  keyval,
int  length 
)
static

Definition at line 298 of file php/ext/google/protobuf/map.c.

◆ map_iter_key()

const char* map_iter_key ( MapIter iter,
int *  len 
)

Definition at line 508 of file php/ext/google/protobuf/map.c.

◆ map_iter_value()

upb_value map_iter_value ( MapIter iter,
int *  len 
)

Definition at line 513 of file php/ext/google/protobuf/map.c.

◆ map_next()

void map_next ( MapIter iter)

Definition at line 500 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [1/11]

PHP_METHOD ( MapField  ,
__construct   
)

Definition at line 391 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [2/11]

PHP_METHOD ( MapField  ,
count   
)

Definition at line 472 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [3/11]

PHP_METHOD ( MapField  ,
getIterator   
)

Definition at line 482 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [4/11]

PHP_METHOD ( MapField  ,
offsetExists   
)

Definition at line 421 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [5/11]

PHP_METHOD ( MapField  ,
offsetGet   
)

Definition at line 444 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [6/11]

PHP_METHOD ( MapField  ,
offsetSet   
)

Definition at line 454 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [7/11]

PHP_METHOD ( MapField  ,
offsetUnset   
)

Definition at line 463 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [8/11]

PHP_METHOD ( MapFieldIter  ,
current   
)

Definition at line 561 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [9/11]

PHP_METHOD ( MapFieldIter  ,
key   
)

Definition at line 573 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [10/11]

PHP_METHOD ( MapFieldIter  ,
next   
)

Definition at line 584 of file php/ext/google/protobuf/map.c.

◆ PHP_METHOD() [11/11]

PHP_METHOD ( MapFieldIter  ,
valid   
)

Definition at line 589 of file php/ext/google/protobuf/map.c.

◆ PHP_PROTO_INIT_CLASS_START() [1/2]

PHP_PROTO_INIT_CLASS_START ( "Google\\Protobuf\\Internal\\MapField"  ,
Map  ,
map_field   
)

Definition at line 238 of file php/ext/google/protobuf/map.c.

◆ PHP_PROTO_INIT_CLASS_START() [2/2]

PHP_PROTO_INIT_CLASS_START ( "Google\\Protobuf\\Internal\\MapFieldIter"  ,
MapIter  ,
map_field_iter   
)

Definition at line 547 of file php/ext/google/protobuf/map.c.

◆ php_proto_map_object_release()

static void php_proto_map_object_release ( void value)
inlinestatic

Definition at line 186 of file php/ext/google/protobuf/map.c.

◆ php_proto_map_string_release()

static void php_proto_map_string_release ( void value)
inlinestatic

Definition at line 182 of file php/ext/google/protobuf/map.c.

◆ table_key()

static bool table_key ( Map self,
zval *  key,
char *  buf,
const char **  out_key,
size_t *out_length  TSRMLS_DC 
)
static

Definition at line 89 of file php/ext/google/protobuf/map.c.

◆ upb_value_memory()

void* upb_value_memory ( upb_value v)

Definition at line 52 of file php/ext/google/protobuf/map.c.

Variable Documentation

◆ intern

Definition at line 222 of file php/ext/google/protobuf/map.c.

◆ it

MapIter it

Definition at line 205 of file php/ext/google/protobuf/map.c.

◆ len

int len

Definition at line 206 of file php/ext/google/protobuf/map.c.

◆ map_field_handlers

zend_object_handlers* map_field_handlers

Definition at line 162 of file php/ext/google/protobuf/map.c.

◆ map_field_iter_handlers

zend_object_handlers* map_field_iter_handlers

Definition at line 163 of file php/ext/google/protobuf/map.c.

◆ map_field_iter_methods

zend_function_entry map_field_iter_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 521 of file php/ext/google/protobuf/map.c.

◆ map_field_iter_type

zend_class_entry* map_field_iter_type

Definition at line 160 of file php/ext/google/protobuf/map.c.

◆ map_field_methods

zend_function_entry map_field_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 139 of file php/ext/google/protobuf/map.c.

◆ map_field_type

zend_class_entry* map_field_type

Definition at line 159 of file php/ext/google/protobuf/map.c.

◆ self

Definition at line 543 of file php/ext/google/protobuf/map.c.

NULL
NULL
Definition: test_security_zap.cpp:405
self
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern self
Definition: php/ext/google/protobuf/map.c:543
native_slot_size
size_t native_slot_size(upb_fieldtype_t type)
Definition: php/ext/google/protobuf/storage.c:43
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:4175
key
const SETUP_TEARDOWN_TESTCONTEXT char * key
Definition: test_wss_transport.cpp:10
type
GLenum type
Definition: glcorearb.h:2695


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:03