Macros | Functions | Variables
type_check.c File Reference
#include <Zend/zend_operators.h>
#include <Zend/zend_exceptions.h>
#include "protobuf.h"
#include "utf8.h"
Include dependency graph for type_check.c:

Go to the source code of this file.

Macros

#define CONVERT_TO_FLOAT(type)
 
#define CONVERT_TO_INTEGER(type)
 
#define PHP_TYPE_CHECK(type)   PHP_METHOD(Util, check##type) {}
 

Functions

void check_map_field (const zend_class_entry *klass, PHP_PROTO_LONG key_type, PHP_PROTO_LONG value_type, zval *val, zval *return_value)
 
void check_repeated_field (const zend_class_entry *klass, PHP_PROTO_LONG type, zval *val, zval *return_value)
 
static zend_uchar convert_numeric_string (const char *str, int length, int64_t *lval, double *dval)
 
 CONVERT_TO_FLOAT (double)
 
 CONVERT_TO_FLOAT (float)
 
 CONVERT_TO_INTEGER (int32)
 
 CONVERT_TO_INTEGER (int64)
 
 CONVERT_TO_INTEGER (uint32)
 
 CONVERT_TO_INTEGER (uint64)
 
 PHP_METHOD (Util, checkMapField)
 
 PHP_METHOD (Util, checkMessage)
 
 PHP_METHOD (Util, checkRepeatedField)
 
bool protobuf_convert_to_bool (zval *from, int8_t *to)
 
bool protobuf_convert_to_string (zval *from)
 
void util_init (TSRMLS_D)
 

Variables

static const char int64_min_digits [] = "9223372036854775808"
 
static zend_function_entry util_methods []
 
static zend_class_entry * util_type
 

Macro Definition Documentation

◆ CONVERT_TO_FLOAT

#define CONVERT_TO_FLOAT (   type)

Definition at line 272 of file type_check.c.

◆ CONVERT_TO_INTEGER

#define CONVERT_TO_INTEGER (   type)

Definition at line 211 of file type_check.c.

◆ PHP_TYPE_CHECK

#define PHP_TYPE_CHECK (   type)    PHP_METHOD(Util, check##type) {}

Definition at line 416 of file type_check.c.

Function Documentation

◆ check_map_field()

void check_map_field ( const zend_class_entry *  klass,
PHP_PROTO_LONG  key_type,
PHP_PROTO_LONG  value_type,
zval *  val,
zval *  return_value 
)

Definition at line 524 of file type_check.c.

◆ check_repeated_field()

void check_repeated_field ( const zend_class_entry *  klass,
PHP_PROTO_LONG  type,
zval *  val,
zval *  return_value 
)

Definition at line 451 of file type_check.c.

◆ convert_numeric_string()

static zend_uchar convert_numeric_string ( const char *  str,
int  length,
int64_t lval,
double *  dval 
)
static

Definition at line 94 of file type_check.c.

◆ CONVERT_TO_FLOAT() [1/2]

CONVERT_TO_FLOAT ( double  )

◆ CONVERT_TO_FLOAT() [2/2]

CONVERT_TO_FLOAT ( float  )

◆ CONVERT_TO_INTEGER() [1/4]

CONVERT_TO_INTEGER ( int32  )

◆ CONVERT_TO_INTEGER() [2/4]

CONVERT_TO_INTEGER ( int64  )

◆ CONVERT_TO_INTEGER() [3/4]

CONVERT_TO_INTEGER ( uint32  )

◆ CONVERT_TO_INTEGER() [4/4]

CONVERT_TO_INTEGER ( uint64  )

◆ PHP_METHOD() [1/3]

PHP_METHOD ( Util  ,
checkMapField   
)

Definition at line 597 of file type_check.c.

◆ PHP_METHOD() [2/3]

PHP_METHOD ( Util  ,
checkMessage   
)

Definition at line 432 of file type_check.c.

◆ PHP_METHOD() [3/3]

PHP_METHOD ( Util  ,
checkRepeatedField   
)

Definition at line 513 of file type_check.c.

◆ protobuf_convert_to_bool()

bool protobuf_convert_to_bool ( zval *  from,
int8_t to 
)

Definition at line 334 of file type_check.c.

◆ protobuf_convert_to_string()

bool protobuf_convert_to_string ( zval *  from)

Definition at line 375 of file type_check.c.

◆ util_init()

void util_init ( TSRMLS_D  )

Definition at line 80 of file type_check.c.

Variable Documentation

◆ int64_min_digits

const char int64_min_digits[] = "9223372036854775808"
static

Definition at line 38 of file type_check.c.

◆ util_methods

zend_function_entry util_methods[]
static
Initial value:
= {
PHP_ME(Util, checkRepeatedField, arg_check_repeated,
ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_FE_END
}

Definition at line 62 of file type_check.c.

◆ util_type

zend_class_entry* util_type
static

Definition at line 37 of file type_check.c.



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