Macros | Functions | Variables
protobuf/php/ext/google/protobuf/convert.c File Reference
#include "convert.h"
#include <php.h>
#include <Zend/zend_exceptions.h>
#include "array.h"
#include "map.h"
#include "message.h"
#include "php-upb.h"
#include "protobuf.h"
Include dependency graph for protobuf/php/ext/google/protobuf/convert.c:

Go to the source code of this file.

Macros

#define CASE(descriptor_type, type)
 

Functions

static bool buftoint64 (const char *ptr, const char *end, int64_t *val)
 
static bool buftouint64 (const char *ptr, const char *end, uint64_t *val)
 
void Convert_ModuleInit (void)
 
bool Convert_PhpToInt64 (const zval *php_val, int64_t *i64)
 
bool Convert_PhpToUpb (zval *php_val, upb_msgval *upb_val, TypeInfo type, upb_arena *arena)
 
bool Convert_PhpToUpbAutoWrap (zval *val, upb_msgval *upb_val, TypeInfo type, upb_arena *arena)
 
void Convert_UpbToPhp (upb_msgval upb_val, zval *php_val, TypeInfo type, zval *arena)
 
upb_fieldtype_t pbphp_dtype_to_type (upb_descriptortype_t type)
 
 PHP_METHOD (Util, checkBool)
 
 PHP_METHOD (Util, checkBytes)
 
 PHP_METHOD (Util, checkDouble)
 
 PHP_METHOD (Util, checkEnum)
 
 PHP_METHOD (Util, checkFloat)
 
 PHP_METHOD (Util, checkInt32)
 
 PHP_METHOD (Util, checkInt64)
 
 PHP_METHOD (Util, checkMapField)
 
 PHP_METHOD (Util, checkMessage)
 
 PHP_METHOD (Util, checkRepeatedField)
 
 PHP_METHOD (Util, checkString)
 
 PHP_METHOD (Util, checkUint32)
 
 PHP_METHOD (Util, checkUint64)
 
static void throw_conversion_exception (const char *to, const zval *zv)
 
static bool to_bool (zval *from, bool *to)
 
static bool to_double (zval *php_val, double *dbl)
 
static bool to_string (zval *from)
 

Variables

static zend_class_entry * GPBUtil_class_entry
 
static zend_function_entry util_methods []
 

Macro Definition Documentation

◆ CASE

#define CASE (   descriptor_type,
  type 
)
Value:
case UPB_DESCRIPTOR_TYPE_##descriptor_type: \
return UPB_TYPE_##type;

Function Documentation

◆ buftoint64()

static bool buftoint64 ( const char *  ptr,
const char *  end,
int64_t val 
)
static

Definition at line 218 of file protobuf/php/ext/google/protobuf/convert.c.

◆ buftouint64()

static bool buftouint64 ( const char *  ptr,
const char *  end,
uint64_t val 
)
static

Definition at line 189 of file protobuf/php/ext/google/protobuf/convert.c.

◆ Convert_ModuleInit()

void Convert_ModuleInit ( void  )

Definition at line 506 of file protobuf/php/ext/google/protobuf/convert.c.

◆ Convert_PhpToInt64()

bool Convert_PhpToInt64 ( const zval *  php_val,
int64_t i64 
)

Definition at line 247 of file protobuf/php/ext/google/protobuf/convert.c.

◆ Convert_PhpToUpb()

bool Convert_PhpToUpb ( zval *  php_val,
upb_msgval upb_val,
TypeInfo  type,
upb_arena arena 
)

Definition at line 356 of file protobuf/php/ext/google/protobuf/convert.c.

◆ Convert_PhpToUpbAutoWrap()

bool Convert_PhpToUpbAutoWrap ( zval *  val,
upb_msgval upb_val,
TypeInfo  type,
upb_arena arena 
)

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

◆ Convert_UpbToPhp()

void Convert_UpbToPhp ( upb_msgval  upb_val,
zval *  php_val,
TypeInfo  type,
zval *  arena 
)

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

◆ pbphp_dtype_to_type()

upb_fieldtype_t pbphp_dtype_to_type ( upb_descriptortype_t  type)

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

◆ PHP_METHOD() [1/13]

PHP_METHOD ( Util  ,
checkBool   
)

Definition at line 63 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [2/13]

PHP_METHOD ( Util  ,
checkBytes   
)

Definition at line 65 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [3/13]

PHP_METHOD ( Util  ,
checkDouble   
)

Definition at line 62 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [4/13]

PHP_METHOD ( Util  ,
checkEnum   
)

Definition at line 60 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [5/13]

PHP_METHOD ( Util  ,
checkFloat   
)

Definition at line 61 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [6/13]

PHP_METHOD ( Util  ,
checkInt32   
)

Definition at line 56 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [7/13]

PHP_METHOD ( Util  ,
checkInt64   
)

Definition at line 58 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [8/13]

PHP_METHOD ( Util  ,
checkMapField   
)

Definition at line 73 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [9/13]

PHP_METHOD ( Util  ,
checkMessage   
)

Definition at line 66 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [10/13]

PHP_METHOD ( Util  ,
checkRepeatedField   
)

Definition at line 86 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [11/13]

PHP_METHOD ( Util  ,
checkString   
)

Definition at line 64 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [12/13]

PHP_METHOD ( Util  ,
checkUint32   
)

Definition at line 57 of file protobuf/php/ext/google/protobuf/convert.c.

◆ PHP_METHOD() [13/13]

PHP_METHOD ( Util  ,
checkUint64   
)

Definition at line 59 of file protobuf/php/ext/google/protobuf/convert.c.

◆ throw_conversion_exception()

static void throw_conversion_exception ( const char *  to,
const zval *  zv 
)
static

Definition at line 236 of file protobuf/php/ext/google/protobuf/convert.c.

◆ to_bool()

static bool to_bool ( zval *  from,
bool to 
)
static

Definition at line 305 of file protobuf/php/ext/google/protobuf/convert.c.

◆ to_double()

static bool to_double ( zval *  php_val,
double *  dbl 
)
static

Definition at line 277 of file protobuf/php/ext/google/protobuf/convert.c.

◆ to_string()

static bool to_string ( zval *  from)
static

Definition at line 333 of file protobuf/php/ext/google/protobuf/convert.c.

Variable Documentation

◆ GPBUtil_class_entry

zend_class_entry* GPBUtil_class_entry
static

Definition at line 48 of file protobuf/php/ext/google/protobuf/convert.c.

◆ util_methods

zend_function_entry util_methods[]
static
Initial value:
= {
PHP_ME(Util, checkInt32, arginfo_checkPrimitive,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkUint32, arginfo_checkPrimitive,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkInt64, arginfo_checkPrimitive,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkUint64, arginfo_checkPrimitive,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkEnum, arginfo_checkMessage,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkFloat, arginfo_checkPrimitive,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkDouble, arginfo_checkPrimitive,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkBool, arginfo_checkPrimitive,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkString, arginfo_checkString,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkBytes, arginfo_checkPrimitive,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkMessage, arginfo_checkMessage,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkMapField, arginfo_checkMapField,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Util, checkRepeatedField, arginfo_checkRepeatedField,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_FE_END
}

Definition at line 122 of file protobuf/php/ext/google/protobuf/convert.c.

descriptor_type
zend_class_entry * descriptor_type
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37


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