Classes | Macros | Typedefs | Functions | Variables
php/ext/google/protobuf/encode_decode.c File Reference
#include <php.h>
#include <Zend/zend_exceptions.h>
#include "protobuf.h"
#include "utf8.h"
Include dependency graph for php/ext/google/protobuf/encode_decode.c:

Go to the source code of this file.

Classes

struct  map_handlerdata_t
 
struct  map_parse_frame_data_t
 
struct  oneof_handlerdata_t
 
struct  stackenv
 
struct  stringfields_parseframe_t
 
struct  submsg_handlerdata_t
 
struct  unknownfields_handlerdata_t
 

Macros

#define DEFINE_APPEND_HANDLER(type, ctype)
 
#define DEFINE_ONEOF_HANDLER(type, ctype)
 
#define DEFINE_SINGULAR_HANDLER(type, ctype)
 
#define DEREF(msg, ofs, type)   *(type*)(((uint8_t *)msg) + ofs)
 
#define SET_HANDLER(utype, ltype)
 
#define SET_HANDLER(utype, ltype)
 
#define SET_HANDLER(utype, ltype)
 
#define STACK_ENV_STACKBYTES   4096
 
#define T(upbtypeconst, upbtype, ctype)
 
#define T(upbtypeconst, upbtype, ctype, default_value)
 
#define T(upbtypeconst, upbtype, ctype, default_value)
 

Typedefs

typedef size_t(* encodeunknown_handlerfunc) (void *_sink, const void *hd, const char *ptr, size_t len, const upb_bufhandle *handle)
 
typedef typedefPHP_PROTO_WRAP_OBJECT_END struct map_parse_frame_t map_parse_frame_t
 

Functions

static void add_handlers_for_mapentry (const upb_msgdef *msgdef, upb_handlers *h, Descriptor *desc)
 
static void add_handlers_for_mapfield (upb_handlers *h, const upb_fielddef *fielddef, size_t offset, Descriptor *desc)
 
void add_handlers_for_message (const void *closure, upb_handlers *h)
 
static void add_handlers_for_oneof_field (upb_handlers *h, const upb_msgdef *m, const upb_fielddef *f, size_t offset, size_t oneof_case_offset, int property_cache_offset)
 
static void add_handlers_for_repeated_field (upb_handlers *h, const upb_fielddef *f, size_t offset)
 
static void add_handlers_for_singular_field (upb_handlers *h, const upb_fielddef *f, size_t offset)
 
static bool add_unknown_handler (void *closure, const void *hd, const char *buf, size_t size)
 
static bool appendstr_end_handler (void *closure, const void *hd)
 
static void * appendstr_handler (void *closure, const void *hd, size_t size_hint)
 
static void * appendsubmsg_handler (void *closure, const void *hd)
 
static void discard_unknown_fields (MessageHeader *msg)
 
static void * empty_php_string (zval **value_ptr)
 
static void * empty_php_string2 (zval **value_ptr)
 
static bool endmap_handler (void *closure, const void *hd, upb_status *s)
 
const upb_handlersget_fill_handlers (Descriptor *desc)
 
static upb_selector_t getsel (const upb_fielddef *f, upb_handlertype_t type)
 
static bool is_wrapper_msg (const upb_msgdef *msg)
 
static void map_slot_init (void *memory, upb_fieldtype_t type, zval *cache)
 
static void map_slot_key (upb_fieldtype_t type, const void *from, const char **keyval, size_t *length)
 
static void map_slot_uninit (void *memory, upb_fieldtype_t type)
 
static void map_slot_value (upb_fieldtype_t type, const void *from, upb_value *v)
 
void merge_from_string (const char *data, int data_len, Descriptor *desc, MessageHeader *msg)
 
static const upb_pbdecodermethodmsgdef_decodermethod (Descriptor *desc)
 
static const upb_handlersmsgdef_json_serialize_handlers (Descriptor *desc, bool preserve_proto_fieldnames)
 
static const upb_json_parsermethodmsgdef_jsonparsermethod (Descriptor *desc)
 
static const upb_handlersmsgdef_pb_serialize_handlers (Descriptor *desc)
 
static map_handlerdata_tnew_map_handlerdata (size_t ofs, const upb_msgdef *mapentry_def, Descriptor *desc)
 
static void new_php_string (zval **value_ptr, const char *str, size_t len)
 
static const void * newhandlerdata (upb_handlers *h, uint32_t ofs)
 
static const void * newoneofhandlerdata (upb_handlers *h, uint32_t ofs, uint32_t case_ofs, int property_ofs, const upb_msgdef *m, const upb_fielddef *f)
 
static const void * newsubmsghandlerdata (upb_handlers *h, uint32_t ofs, const upb_fielddef *f)
 
static const void * newunknownfieldshandlerdata (upb_handlers *h)
 
static void oneof_cleanup (MessageHeader *msg, const oneof_handlerdata_t *oneofdata)
 
static void * oneofbytes_handler (void *closure, const void *hd, size_t size_hint)
 
static bool oneofstr_end_handler (void *closure, const void *hd)
 
static void * oneofstr_handler (void *closure, const void *hd, size_t size_hint)
 
static void * oneofsubmsg_handler (void *closure, const void *hd)
 
 PHP_METHOD (Message, discardUnknownFields)
 
 PHP_METHOD (Message, mergeFromJsonString)
 
 PHP_METHOD (Message, mergeFromString)
 
 PHP_METHOD (Message, serializeToJsonString)
 
 PHP_METHOD (Message, serializeToString)
 
static void put_optional_value (const void *memory, int len, const upb_fielddef *f, int depth, upb_sink sink, bool is_json TSRMLS_DC)
 
static void putarray (zval *array, const upb_fielddef *f, upb_sink sink, int depth, bool is_json TSRMLS_DC)
 
static void putjsonany (MessageHeader *msg, const Descriptor *desc, upb_sink sink, int depth TSRMLS_DC)
 
static void putjsonlistvalue (MessageHeader *msg, const Descriptor *desc, upb_sink sink, int depth TSRMLS_DC)
 
static void putjsonstruct (MessageHeader *msg, const Descriptor *desc, upb_sink sink, int depth TSRMLS_DC)
 
static void putmap (zval *map, const upb_fielddef *f, upb_sink sink, int depth, bool is_json TSRMLS_DC)
 
static void putmsg (zval *msg, const Descriptor *desc, upb_sink sink, int depth, bool is_json TSRMLS_DC)
 
static void putrawmsg (MessageHeader *msg, const Descriptor *desc, upb_sink sink, int depth, bool is_json, bool open_msg TSRMLS_DC)
 
static void putrawstr (const char *str, int len, const upb_fielddef *f, upb_sink sink, bool force_default)
 
static void putrawsubmsg (MessageHeader *submsg, const upb_fielddef *f, upb_sink sink, int depth, bool is_json TSRMLS_DC)
 
static void putstr (zval *str, const upb_fielddef *f, upb_sink sink, bool force_default)
 
static void putsubmsg (zval *submsg, const upb_fielddef *f, upb_sink sink, int depth, bool is_json TSRMLS_DC)
 
static const char * raw_value (void *memory, const upb_fielddef *f)
 
static int raw_value_len (void *memory, int len, const upb_fielddef *f)
 
void serialize_to_string (zval *val, zval *return_value TSRMLS_DC)
 
static void stackenv_init (stackenv *se, const char *errmsg)
 
static void stackenv_uninit (stackenv *se)
 
static void * startmapentry_handler (void *closure, const void *hd)
 
static void * startseq_handler (void *closure, const void *hd)
 
static bool str_end_handler (void *closure, const void *hd)
 
static void * str_handler (void *closure, const void *hd, size_t size_hint)
 
static size_t stringdata_handler (void *closure, const void *hd, const char *str, size_t len, const upb_bufhandle *handle)
 
void stringsink_init (stringsink *sink)
 
static void * stringsink_start (void *_sink, const void *hd, size_t size_hint)
 
size_t stringsink_string (void *_sink, const void *hd, const char *ptr, size_t len, const upb_bufhandle *handle)
 
void stringsink_uninit (stringsink *sink)
 
void stringsink_uninit_opaque (void *sink)
 
static void * submsg_handler (void *closure, const void *hd)
 

Variables

map_parse_frame_data_tdata
 
zval key_zval
 
zval * map
 
zval value_zval
 

Macro Definition Documentation

◆ DEFINE_APPEND_HANDLER

#define DEFINE_APPEND_HANDLER (   type,
  ctype 
)
Value:
static bool append##type##_handler(void* closure, const void* hd, \
ctype val) { \
zval* array = (zval*)closure; \
TSRMLS_FETCH(); \
RepeatedField* intern = UNBOX(RepeatedField, array); \
repeated_field_push_native(intern, &val); \
return true; \
}

Definition at line 229 of file php/ext/google/protobuf/encode_decode.c.

◆ DEFINE_ONEOF_HANDLER

#define DEFINE_ONEOF_HANDLER (   type,
  ctype 
)
Value:
static bool oneof##type##_handler(void* closure, const void* hd, \
ctype val) { \
const oneof_handlerdata_t* oneofdata = hd; \
MessageHeader* msg = (MessageHeader*)closure; \
DEREF(message_data(closure), oneofdata->case_ofs, uint32_t) = \
oneofdata->oneof_case_num; \
DEREF(message_data(closure), oneofdata->ofs, ctype) = val; \
return true; \
}

Definition at line 673 of file php/ext/google/protobuf/encode_decode.c.

◆ DEFINE_SINGULAR_HANDLER

#define DEFINE_SINGULAR_HANDLER (   type,
  ctype 
)
Value:
static bool type##_handler(void* closure, const void* hd, \
ctype val) { \
MessageHeader* msg = (MessageHeader*)closure; \
const size_t *ofs = hd; \
DEREF(message_data(msg), *ofs, ctype) = val; \
return true; \
}

Definition at line 286 of file php/ext/google/protobuf/encode_decode.c.

◆ DEREF

#define DEREF (   msg,
  ofs,
  type 
)    *(type*)(((uint8_t *)msg) + ofs)

Definition at line 131 of file php/ext/google/protobuf/encode_decode.c.

◆ SET_HANDLER [1/3]

#define SET_HANDLER (   utype,
  ltype 
)
Value:
case utype: \
upb_handlers_set##ltype(h, f, append##ltype##_handler, NULL); \
break;

◆ SET_HANDLER [2/3]

#define SET_HANDLER (   utype,
  ltype 
)
Value:
case utype: { \
upb_handlerattr attr = UPB_HANDLERATTR_INIT; \
attr.handler_data = newhandlerdata(h, offset); \
upb_handlers_set##ltype(h, f, ltype##_handler, &attr); \
break; \
}

◆ SET_HANDLER [3/3]

#define SET_HANDLER (   utype,
  ltype 
)
Value:
case utype: \
upb_handlers_set##ltype(h, f, oneof##ltype##_handler, &attr); \
break;

◆ STACK_ENV_STACKBYTES

#define STACK_ENV_STACKBYTES   4096

Definition at line 91 of file php/ext/google/protobuf/encode_decode.c.

◆ T [1/3]

#define T (   upbtypeconst,
  upbtype,
  ctype 
)
Value:
case upbtypeconst: \
upb_sink_put##upbtype(subsink, sel, *((ctype*)memory)); \
break;

◆ T [2/3]

#define T (   upbtypeconst,
  upbtype,
  ctype,
  default_value 
)
Value:
case upbtypeconst: { \
ctype value = DEREF(memory, 0, ctype); \
if (is_json || value != default_value) { \
upb_selector_t sel = getsel(f, upb_handlers_getprimitivehandlertype(f)); \
upb_sink_put##upbtype(sink, sel, value); \
} \
} break;

◆ T [3/3]

#define T (   upbtypeconst,
  upbtype,
  ctype,
  default_value 
)
Value:
case upbtypeconst: { \
ctype value = DEREF(message_data(msg), offset, ctype); \
(is_json && is_wrapper_msg(desc->msgdef)) || \
value != default_value) { \
upb_sink_put##upbtype(sink, sel, value); \
} \
} break;

Typedef Documentation

◆ encodeunknown_handlerfunc

typedef size_t(* encodeunknown_handlerfunc) (void *_sink, const void *hd, const char *ptr, size_t len, const upb_bufhandle *handle)

Definition at line 147 of file php/ext/google/protobuf/encode_decode.c.

◆ map_parse_frame_t

typedef typedefPHP_PROTO_WRAP_OBJECT_END struct map_parse_frame_t map_parse_frame_t

Definition at line 486 of file php/ext/google/protobuf/encode_decode.c.

Function Documentation

◆ add_handlers_for_mapentry()

static void add_handlers_for_mapentry ( const upb_msgdef msgdef,
upb_handlers h,
Descriptor desc 
)
static

Definition at line 923 of file php/ext/google/protobuf/encode_decode.c.

◆ add_handlers_for_mapfield()

static void add_handlers_for_mapfield ( upb_handlers h,
const upb_fielddef fielddef,
size_t  offset,
Descriptor desc 
)
static

Definition at line 909 of file php/ext/google/protobuf/encode_decode.c.

◆ add_handlers_for_message()

void add_handlers_for_message ( const void *  closure,
upb_handlers h 
)

Definition at line 1004 of file php/ext/google/protobuf/encode_decode.c.

◆ add_handlers_for_oneof_field()

static void add_handlers_for_oneof_field ( upb_handlers h,
const upb_msgdef m,
const upb_fielddef f,
size_t  offset,
size_t  oneof_case_offset,
int  property_cache_offset 
)
static

Definition at line 943 of file php/ext/google/protobuf/encode_decode.c.

◆ add_handlers_for_repeated_field()

static void add_handlers_for_repeated_field ( upb_handlers h,
const upb_fielddef f,
size_t  offset 
)
static

Definition at line 825 of file php/ext/google/protobuf/encode_decode.c.

◆ add_handlers_for_singular_field()

static void add_handlers_for_singular_field ( upb_handlers h,
const upb_fielddef f,
size_t  offset 
)
static

Definition at line 867 of file php/ext/google/protobuf/encode_decode.c.

◆ add_unknown_handler()

static bool add_unknown_handler ( void *  closure,
const void *  hd,
const char *  buf,
size_t  size 
)
static

Definition at line 986 of file php/ext/google/protobuf/encode_decode.c.

◆ appendstr_end_handler()

static bool appendstr_end_handler ( void *  closure,
const void *  hd 
)
static

Definition at line 262 of file php/ext/google/protobuf/encode_decode.c.

◆ appendstr_handler()

static void* appendstr_handler ( void *  closure,
const void *  hd,
size_t  size_hint 
)
static

Definition at line 248 of file php/ext/google/protobuf/encode_decode.c.

◆ appendsubmsg_handler()

static void* appendsubmsg_handler ( void *  closure,
const void *  hd 
)
static

Definition at line 396 of file php/ext/google/protobuf/encode_decode.c.

◆ discard_unknown_fields()

static void discard_unknown_fields ( MessageHeader msg)
static

Definition at line 1790 of file php/ext/google/protobuf/encode_decode.c.

◆ empty_php_string()

static void* empty_php_string ( zval **  value_ptr)
static

Definition at line 306 of file php/ext/google/protobuf/encode_decode.c.

◆ empty_php_string2()

static void* empty_php_string2 ( zval **  value_ptr)
static

Definition at line 325 of file php/ext/google/protobuf/encode_decode.c.

◆ endmap_handler()

static bool endmap_handler ( void *  closure,
const void *  hd,
upb_status s 
)
static

Definition at line 620 of file php/ext/google/protobuf/encode_decode.c.

◆ get_fill_handlers()

const upb_handlers* get_fill_handlers ( Descriptor desc)

Definition at line 1055 of file php/ext/google/protobuf/encode_decode.c.

◆ getsel()

static upb_selector_t getsel ( const upb_fielddef f,
upb_handlertype_t  type 
)
static

Definition at line 1101 of file php/ext/google/protobuf/encode_decode.c.

◆ is_wrapper_msg()

static bool is_wrapper_msg ( const upb_msgdef msg)
static

Definition at line 126 of file php/ext/google/protobuf/encode_decode.c.

◆ map_slot_init()

static void map_slot_init ( void *  memory,
upb_fieldtype_t  type,
zval *  cache 
)
static

Definition at line 488 of file php/ext/google/protobuf/encode_decode.c.

◆ map_slot_key()

static void map_slot_key ( upb_fieldtype_t  type,
const void *  from,
const char **  keyval,
size_t *  length 
)
static

Definition at line 545 of file php/ext/google/protobuf/encode_decode.c.

◆ map_slot_uninit()

static void map_slot_uninit ( void *  memory,
upb_fieldtype_t  type 
)
static

Definition at line 526 of file php/ext/google/protobuf/encode_decode.c.

◆ map_slot_value()

static void map_slot_value ( upb_fieldtype_t  type,
const void *  from,
upb_value v 
)
static

Definition at line 562 of file php/ext/google/protobuf/encode_decode.c.

◆ merge_from_string()

void merge_from_string ( const char *  data,
int  data_len,
Descriptor desc,
MessageHeader msg 
)

Definition at line 1688 of file php/ext/google/protobuf/encode_decode.c.

◆ msgdef_decodermethod()

static const upb_pbdecodermethod* msgdef_decodermethod ( Descriptor desc)
static

Definition at line 1059 of file php/ext/google/protobuf/encode_decode.c.

◆ msgdef_json_serialize_handlers()

static const upb_handlers * msgdef_json_serialize_handlers ( Descriptor desc,
bool  preserve_proto_fieldnames 
)
static

Definition at line 1644 of file php/ext/google/protobuf/encode_decode.c.

◆ msgdef_jsonparsermethod()

static const upb_json_parsermethod* msgdef_jsonparsermethod ( Descriptor desc)
static

Definition at line 1063 of file php/ext/google/protobuf/encode_decode.c.

◆ msgdef_pb_serialize_handlers()

static const upb_handlers* msgdef_pb_serialize_handlers ( Descriptor desc)
static

Definition at line 1639 of file php/ext/google/protobuf/encode_decode.c.

◆ new_map_handlerdata()

static map_handlerdata_t* new_map_handlerdata ( size_t  ofs,
const upb_msgdef mapentry_def,
Descriptor desc 
)
static

Definition at line 651 of file php/ext/google/protobuf/encode_decode.c.

◆ new_php_string()

static void new_php_string ( zval **  value_ptr,
const char *  str,
size_t  len 
)
static

Definition at line 334 of file php/ext/google/protobuf/encode_decode.c.

◆ newhandlerdata()

static const void* newhandlerdata ( upb_handlers h,
uint32_t  ofs 
)
static

Definition at line 134 of file php/ext/google/protobuf/encode_decode.c.

◆ newoneofhandlerdata()

static const void* newoneofhandlerdata ( upb_handlers h,
uint32_t  ofs,
uint32_t  case_ofs,
int  property_ofs,
const upb_msgdef m,
const upb_fielddef f 
)
static

Definition at line 191 of file php/ext/google/protobuf/encode_decode.c.

◆ newsubmsghandlerdata()

static const void* newsubmsghandlerdata ( upb_handlers h,
uint32_t  ofs,
const upb_fielddef f 
)
static

Definition at line 171 of file php/ext/google/protobuf/encode_decode.c.

◆ newunknownfieldshandlerdata()

static const void* newunknownfieldshandlerdata ( upb_handlers h)
static

Definition at line 156 of file php/ext/google/protobuf/encode_decode.c.

◆ oneof_cleanup()

static void oneof_cleanup ( MessageHeader msg,
const oneof_handlerdata_t oneofdata 
)
static

Definition at line 694 of file php/ext/google/protobuf/encode_decode.c.

◆ oneofbytes_handler()

static void* oneofbytes_handler ( void *  closure,
const void *  hd,
size_t  size_hint 
)
static

Definition at line 733 of file php/ext/google/protobuf/encode_decode.c.

◆ oneofstr_end_handler()

static bool oneofstr_end_handler ( void *  closure,
const void *  hd 
)
static

Definition at line 749 of file php/ext/google/protobuf/encode_decode.c.

◆ oneofstr_handler()

static void* oneofstr_handler ( void *  closure,
const void *  hd,
size_t  size_hint 
)
static

Definition at line 770 of file php/ext/google/protobuf/encode_decode.c.

◆ oneofsubmsg_handler()

static void* oneofsubmsg_handler ( void *  closure,
const void *  hd 
)
static

Definition at line 785 of file php/ext/google/protobuf/encode_decode.c.

◆ PHP_METHOD() [1/5]

PHP_METHOD ( Message  ,
discardUnknownFields   
)

Definition at line 1884 of file php/ext/google/protobuf/encode_decode.c.

◆ PHP_METHOD() [2/5]

PHP_METHOD ( Message  ,
mergeFromJsonString   
)

Definition at line 1751 of file php/ext/google/protobuf/encode_decode.c.

◆ PHP_METHOD() [3/5]

PHP_METHOD ( Message  ,
mergeFromString   
)

Definition at line 1704 of file php/ext/google/protobuf/encode_decode.c.

◆ PHP_METHOD() [4/5]

PHP_METHOD ( Message  ,
serializeToJsonString   
)

Definition at line 1720 of file php/ext/google/protobuf/encode_decode.c.

◆ PHP_METHOD() [5/5]

PHP_METHOD ( Message  ,
serializeToString   
)

Definition at line 1684 of file php/ext/google/protobuf/encode_decode.c.

◆ put_optional_value()

static void put_optional_value ( const void *  memory,
int  len,
const upb_fielddef f,
int  depth,
upb_sink  sink,
bool is_json  TSRMLS_DC 
)
static

Definition at line 1108 of file php/ext/google/protobuf/encode_decode.c.

◆ putarray()

static void putarray ( zval *  array,
const upb_fielddef f,
upb_sink  sink,
int  depth,
bool is_json  TSRMLS_DC 
)
static

Definition at line 1572 of file php/ext/google/protobuf/encode_decode.c.

◆ putjsonany()

static void putjsonany ( MessageHeader msg,
const Descriptor desc,
upb_sink  sink,
int depth  TSRMLS_DC 
)
static

Definition at line 1238 of file php/ext/google/protobuf/encode_decode.c.

◆ putjsonlistvalue()

static void putjsonlistvalue ( MessageHeader msg,
const Descriptor desc,
upb_sink  sink,
int depth  TSRMLS_DC 
)
static

Definition at line 1326 of file php/ext/google/protobuf/encode_decode.c.

◆ putjsonstruct()

static void putjsonstruct ( MessageHeader msg,
const Descriptor desc,
upb_sink  sink,
int depth  TSRMLS_DC 
)
static

Definition at line 1356 of file php/ext/google/protobuf/encode_decode.c.

◆ putmap()

static void putmap ( zval *  map,
const upb_fielddef f,
upb_sink  sink,
int  depth,
bool is_json  TSRMLS_DC 
)
static

Definition at line 1184 of file php/ext/google/protobuf/encode_decode.c.

◆ putmsg()

static void putmsg ( zval *  msg,
const Descriptor desc,
upb_sink  sink,
int  depth,
bool is_json  TSRMLS_DC 
)
static

Definition at line 1229 of file php/ext/google/protobuf/encode_decode.c.

◆ putrawmsg()

static void putrawmsg ( MessageHeader msg,
const Descriptor desc,
upb_sink  sink,
int  depth,
bool  is_json,
bool open_msg  TSRMLS_DC 
)
static

Definition at line 1384 of file php/ext/google/protobuf/encode_decode.c.

◆ putrawstr()

static void putrawstr ( const char *  str,
int  len,
const upb_fielddef f,
upb_sink  sink,
bool  force_default 
)
static

Definition at line 1533 of file php/ext/google/protobuf/encode_decode.c.

◆ putrawsubmsg()

static void putrawsubmsg ( MessageHeader submsg,
const upb_fielddef f,
upb_sink  sink,
int  depth,
bool is_json  TSRMLS_DC 
)
static

Definition at line 1560 of file php/ext/google/protobuf/encode_decode.c.

◆ putstr()

static void putstr ( zval *  str,
const upb_fielddef f,
upb_sink  sink,
bool  force_default 
)
static

Definition at line 1505 of file php/ext/google/protobuf/encode_decode.c.

◆ putsubmsg()

static void putsubmsg ( zval *  submsg,
const upb_fielddef f,
upb_sink  sink,
int  depth,
bool is_json  TSRMLS_DC 
)
static

Definition at line 1552 of file php/ext/google/protobuf/encode_decode.c.

◆ raw_value()

static const char* raw_value ( void *  memory,
const upb_fielddef f 
)
static

Definition at line 1155 of file php/ext/google/protobuf/encode_decode.c.

◆ raw_value_len()

static int raw_value_len ( void *  memory,
int  len,
const upb_fielddef f 
)
static

Definition at line 1170 of file php/ext/google/protobuf/encode_decode.c.

◆ serialize_to_string()

void serialize_to_string ( zval *  val,
zval *return_value  TSRMLS_DC 
)

Definition at line 1659 of file php/ext/google/protobuf/encode_decode.c.

◆ stackenv_init()

static void stackenv_init ( stackenv se,
const char *  errmsg 
)
static

Definition at line 103 of file php/ext/google/protobuf/encode_decode.c.

◆ stackenv_uninit()

static void stackenv_uninit ( stackenv se)
static

Definition at line 109 of file php/ext/google/protobuf/encode_decode.c.

◆ startmapentry_handler()

static void* startmapentry_handler ( void *  closure,
const void *  hd 
)
static

Definition at line 600 of file php/ext/google/protobuf/encode_decode.c.

◆ startseq_handler()

static void* startseq_handler ( void *  closure,
const void *  hd 
)
static

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

◆ str_end_handler()

static bool str_end_handler ( void *  closure,
const void *  hd 
)
static

Definition at line 374 of file php/ext/google/protobuf/encode_decode.c.

◆ str_handler()

static void* str_handler ( void *  closure,
const void *  hd,
size_t  size_hint 
)
static

Definition at line 360 of file php/ext/google/protobuf/encode_decode.c.

◆ stringdata_handler()

static size_t stringdata_handler ( void *  closure,
const void *  hd,
const char *  str,
size_t  len,
const upb_bufhandle handle 
)
static

Definition at line 388 of file php/ext/google/protobuf/encode_decode.c.

◆ stringsink_init()

void stringsink_init ( stringsink sink)

Definition at line 68 of file php/ext/google/protobuf/encode_decode.c.

◆ stringsink_start()

static void* stringsink_start ( void *  _sink,
const void *  hd,
size_t  size_hint 
)
static

Definition at line 39 of file php/ext/google/protobuf/encode_decode.c.

◆ stringsink_string()

size_t stringsink_string ( void *  _sink,
const void *  hd,
const char *  ptr,
size_t  len,
const upb_bufhandle handle 
)

Definition at line 45 of file php/ext/google/protobuf/encode_decode.c.

◆ stringsink_uninit()

void stringsink_uninit ( stringsink sink)

Definition at line 81 of file php/ext/google/protobuf/encode_decode.c.

◆ stringsink_uninit_opaque()

void stringsink_uninit_opaque ( void *  sink)

Definition at line 83 of file php/ext/google/protobuf/encode_decode.c.

◆ submsg_handler()

static void* submsg_handler ( void *  closure,
const void *  hd 
)
static

Definition at line 424 of file php/ext/google/protobuf/encode_decode.c.

Variable Documentation

◆ data

Definition at line 478 of file php/ext/google/protobuf/encode_decode.c.

◆ key_zval

zval key_zval

Definition at line 483 of file php/ext/google/protobuf/encode_decode.c.

◆ map

zval* map

Definition at line 480 of file php/ext/google/protobuf/encode_decode.c.

◆ value_zval

zval value_zval

Definition at line 484 of file php/ext/google/protobuf/encode_decode.c.

is_wrapper_msg
static bool is_wrapper_msg(const upb_msgdef *msg)
Definition: php/ext/google/protobuf/encode_decode.c:126
upb_handlers_getprimitivehandlertype
upb_handlertype_t upb_handlers_getprimitivehandlertype(const upb_fielddef *f)
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/upb.c:5201
MessageHeader
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:574
DEREF
#define DEREF(msg, ofs, type)
Definition: php/ext/google/protobuf/encode_decode.c:131
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
oneof_handlerdata_t
Definition: php/ext/google/protobuf/encode_decode.c:182
newhandlerdata
static const void * newhandlerdata(upb_handlers *h, uint32_t ofs)
Definition: php/ext/google/protobuf/encode_decode.c:134
autogen_x86imm.f
f
Definition: autogen_x86imm.py:9
array
Definition: undname.c:101
msg
std::string msg
Definition: client_interceptors_end2end_test.cc:372
message_data
void * message_data(MessageHeader *msg)
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/message.c:250
value
const char * value
Definition: hpack_parser_table.cc:165
attr
OPENSSL_EXPORT X509_ATTRIBUTE * attr
Definition: x509.h:1666
sink
FormatSinkImpl * sink
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:450
intern
upb_strtable_uninit & intern
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/map.c:222
phone_pb2.containing_oneof
containing_oneof
Definition: phone_pb2.py:204
UPB_HANDLERATTR_INIT
#define UPB_HANDLERATTR_INIT
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/upb.h:3972
desc
#define desc
Definition: bloaty/third_party/protobuf/src/google/protobuf/extension_set.h:338
closure
Definition: proxy.cc:59
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
getsel
static upb_selector_t getsel(const upb_fielddef *f, upb_handlertype_t type)
Definition: php/ext/google/protobuf/encode_decode.c:1101
UNBOX
#define UNBOX(class_name, val)
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:242
offset
voidpf uLong offset
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:142
RepeatedField
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:403


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:11