diff --git a/src/BSON/functions.c b/src/BSON/functions.c index bb4804622..72914c7c9 100644 --- a/src/BSON/functions.c +++ b/src/BSON/functions.c @@ -23,7 +23,7 @@ #include "phongo_error.h" /* Returns the BSON representation of a PHP value */ -PHP_FUNCTION(fromPHP) +PHP_FUNCTION(MongoDB_BSON_fromPHP) { zval* data; bson_t* bson; @@ -40,7 +40,7 @@ PHP_FUNCTION(fromPHP) } /* Returns the PHP representation of a BSON value, optionally converting it into a custom class */ -PHP_FUNCTION(toPHP) +PHP_FUNCTION(MongoDB_BSON_toPHP) { char* data; size_t data_len; @@ -71,7 +71,7 @@ PHP_FUNCTION(toPHP) } /* Returns the BSON representation of a JSON value */ -PHP_FUNCTION(fromJSON) +PHP_FUNCTION(MongoDB_BSON_fromJSON) { char* json; size_t json_len; @@ -125,19 +125,19 @@ static void phongo_bson_to_json(INTERNAL_FUNCTION_PARAMETERS, php_phongo_json_mo } /* Returns the legacy extended JSON representation of a BSON value */ -PHP_FUNCTION(toJSON) +PHP_FUNCTION(MongoDB_BSON_toJSON) { phongo_bson_to_json(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHONGO_JSON_MODE_LEGACY); } /* Returns the canonical extended JSON representation of a BSON value */ -PHP_FUNCTION(toCanonicalExtendedJSON) +PHP_FUNCTION(MongoDB_BSON_toCanonicalExtendedJSON) { phongo_bson_to_json(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHONGO_JSON_MODE_CANONICAL); } /* Returns the relaxed extended JSON representation of a BSON value */ -PHP_FUNCTION(toRelaxedExtendedJSON) +PHP_FUNCTION(MongoDB_BSON_toRelaxedExtendedJSON) { phongo_bson_to_json(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHONGO_JSON_MODE_RELAXED); } diff --git a/src/MongoDB/Monitoring/functions.c b/src/MongoDB/Monitoring/functions.c index 94ef9b1eb..109389471 100644 --- a/src/MongoDB/Monitoring/functions.c +++ b/src/MongoDB/Monitoring/functions.c @@ -23,7 +23,7 @@ ZEND_EXTERN_MODULE_GLOBALS(mongodb) /* Registers a global event subscriber */ -PHP_FUNCTION(addSubscriber) +PHP_FUNCTION(MongoDB_Driver_Monitoring_addSubscriber) { zval* subscriber; @@ -35,7 +35,7 @@ PHP_FUNCTION(addSubscriber) } /* Unregisters a global event subscriber */ -PHP_FUNCTION(removeSubscriber) +PHP_FUNCTION(MongoDB_Driver_Monitoring_removeSubscriber) { zval* subscriber; diff --git a/src/MongoDB/ServerDescription_arginfo.h b/src/MongoDB/ServerDescription_arginfo.h index 8baf74c4b..41b6f7f55 100644 --- a/src/MongoDB/ServerDescription_arginfo.h +++ b/src/MongoDB/ServerDescription_arginfo.h @@ -55,70 +55,70 @@ static zend_class_entry *register_class_MongoDB_Driver_ServerDescription(void) class_entry->ce_flags |= ZEND_ACC_FINAL; zval const_TYPE_UNKNOWN_value; - zend_string *const_TYPE_UNKNOWN_value_str = zend_string_init(PHONGO_SERVER_TYPE_UNKNOWN, sizeof(PHONGO_SERVER_TYPE_UNKNOWN) - 1, 1); + zend_string *const_TYPE_UNKNOWN_value_str = zend_string_init(PHONGO_SERVER_TYPE_UNKNOWN, strlen(PHONGO_SERVER_TYPE_UNKNOWN), 1); ZVAL_STR(&const_TYPE_UNKNOWN_value, const_TYPE_UNKNOWN_value_str); zend_string *const_TYPE_UNKNOWN_name = zend_string_init_interned("TYPE_UNKNOWN", sizeof("TYPE_UNKNOWN") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_UNKNOWN_name, &const_TYPE_UNKNOWN_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_UNKNOWN_name); zval const_TYPE_STANDALONE_value; - zend_string *const_TYPE_STANDALONE_value_str = zend_string_init(PHONGO_SERVER_TYPE_STANDALONE, sizeof(PHONGO_SERVER_TYPE_STANDALONE) - 1, 1); + zend_string *const_TYPE_STANDALONE_value_str = zend_string_init(PHONGO_SERVER_TYPE_STANDALONE, strlen(PHONGO_SERVER_TYPE_STANDALONE), 1); ZVAL_STR(&const_TYPE_STANDALONE_value, const_TYPE_STANDALONE_value_str); zend_string *const_TYPE_STANDALONE_name = zend_string_init_interned("TYPE_STANDALONE", sizeof("TYPE_STANDALONE") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_STANDALONE_name, &const_TYPE_STANDALONE_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_STANDALONE_name); zval const_TYPE_MONGOS_value; - zend_string *const_TYPE_MONGOS_value_str = zend_string_init(PHONGO_SERVER_TYPE_MONGOS, sizeof(PHONGO_SERVER_TYPE_MONGOS) - 1, 1); + zend_string *const_TYPE_MONGOS_value_str = zend_string_init(PHONGO_SERVER_TYPE_MONGOS, strlen(PHONGO_SERVER_TYPE_MONGOS), 1); ZVAL_STR(&const_TYPE_MONGOS_value, const_TYPE_MONGOS_value_str); zend_string *const_TYPE_MONGOS_name = zend_string_init_interned("TYPE_MONGOS", sizeof("TYPE_MONGOS") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_MONGOS_name, &const_TYPE_MONGOS_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_MONGOS_name); zval const_TYPE_POSSIBLE_PRIMARY_value; - zend_string *const_TYPE_POSSIBLE_PRIMARY_value_str = zend_string_init(PHONGO_SERVER_TYPE_POSSIBLE_PRIMARY, sizeof(PHONGO_SERVER_TYPE_POSSIBLE_PRIMARY) - 1, 1); + zend_string *const_TYPE_POSSIBLE_PRIMARY_value_str = zend_string_init(PHONGO_SERVER_TYPE_POSSIBLE_PRIMARY, strlen(PHONGO_SERVER_TYPE_POSSIBLE_PRIMARY), 1); ZVAL_STR(&const_TYPE_POSSIBLE_PRIMARY_value, const_TYPE_POSSIBLE_PRIMARY_value_str); zend_string *const_TYPE_POSSIBLE_PRIMARY_name = zend_string_init_interned("TYPE_POSSIBLE_PRIMARY", sizeof("TYPE_POSSIBLE_PRIMARY") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_POSSIBLE_PRIMARY_name, &const_TYPE_POSSIBLE_PRIMARY_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_POSSIBLE_PRIMARY_name); zval const_TYPE_RS_PRIMARY_value; - zend_string *const_TYPE_RS_PRIMARY_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_PRIMARY, sizeof(PHONGO_SERVER_TYPE_RS_PRIMARY) - 1, 1); + zend_string *const_TYPE_RS_PRIMARY_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_PRIMARY, strlen(PHONGO_SERVER_TYPE_RS_PRIMARY), 1); ZVAL_STR(&const_TYPE_RS_PRIMARY_value, const_TYPE_RS_PRIMARY_value_str); zend_string *const_TYPE_RS_PRIMARY_name = zend_string_init_interned("TYPE_RS_PRIMARY", sizeof("TYPE_RS_PRIMARY") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_RS_PRIMARY_name, &const_TYPE_RS_PRIMARY_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_RS_PRIMARY_name); zval const_TYPE_RS_SECONDARY_value; - zend_string *const_TYPE_RS_SECONDARY_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_SECONDARY, sizeof(PHONGO_SERVER_TYPE_RS_SECONDARY) - 1, 1); + zend_string *const_TYPE_RS_SECONDARY_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_SECONDARY, strlen(PHONGO_SERVER_TYPE_RS_SECONDARY), 1); ZVAL_STR(&const_TYPE_RS_SECONDARY_value, const_TYPE_RS_SECONDARY_value_str); zend_string *const_TYPE_RS_SECONDARY_name = zend_string_init_interned("TYPE_RS_SECONDARY", sizeof("TYPE_RS_SECONDARY") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_RS_SECONDARY_name, &const_TYPE_RS_SECONDARY_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_RS_SECONDARY_name); zval const_TYPE_RS_ARBITER_value; - zend_string *const_TYPE_RS_ARBITER_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_ARBITER, sizeof(PHONGO_SERVER_TYPE_RS_ARBITER) - 1, 1); + zend_string *const_TYPE_RS_ARBITER_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_ARBITER, strlen(PHONGO_SERVER_TYPE_RS_ARBITER), 1); ZVAL_STR(&const_TYPE_RS_ARBITER_value, const_TYPE_RS_ARBITER_value_str); zend_string *const_TYPE_RS_ARBITER_name = zend_string_init_interned("TYPE_RS_ARBITER", sizeof("TYPE_RS_ARBITER") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_RS_ARBITER_name, &const_TYPE_RS_ARBITER_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_RS_ARBITER_name); zval const_TYPE_RS_OTHER_value; - zend_string *const_TYPE_RS_OTHER_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_OTHER, sizeof(PHONGO_SERVER_TYPE_RS_OTHER) - 1, 1); + zend_string *const_TYPE_RS_OTHER_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_OTHER, strlen(PHONGO_SERVER_TYPE_RS_OTHER), 1); ZVAL_STR(&const_TYPE_RS_OTHER_value, const_TYPE_RS_OTHER_value_str); zend_string *const_TYPE_RS_OTHER_name = zend_string_init_interned("TYPE_RS_OTHER", sizeof("TYPE_RS_OTHER") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_RS_OTHER_name, &const_TYPE_RS_OTHER_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_RS_OTHER_name); zval const_TYPE_RS_GHOST_value; - zend_string *const_TYPE_RS_GHOST_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_GHOST, sizeof(PHONGO_SERVER_TYPE_RS_GHOST) - 1, 1); + zend_string *const_TYPE_RS_GHOST_value_str = zend_string_init(PHONGO_SERVER_TYPE_RS_GHOST, strlen(PHONGO_SERVER_TYPE_RS_GHOST), 1); ZVAL_STR(&const_TYPE_RS_GHOST_value, const_TYPE_RS_GHOST_value_str); zend_string *const_TYPE_RS_GHOST_name = zend_string_init_interned("TYPE_RS_GHOST", sizeof("TYPE_RS_GHOST") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_RS_GHOST_name, &const_TYPE_RS_GHOST_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_RS_GHOST_name); zval const_TYPE_LOAD_BALANCER_value; - zend_string *const_TYPE_LOAD_BALANCER_value_str = zend_string_init(PHONGO_SERVER_TYPE_LOAD_BALANCER, sizeof(PHONGO_SERVER_TYPE_LOAD_BALANCER) - 1, 1); + zend_string *const_TYPE_LOAD_BALANCER_value_str = zend_string_init(PHONGO_SERVER_TYPE_LOAD_BALANCER, strlen(PHONGO_SERVER_TYPE_LOAD_BALANCER), 1); ZVAL_STR(&const_TYPE_LOAD_BALANCER_value, const_TYPE_LOAD_BALANCER_value_str); zend_string *const_TYPE_LOAD_BALANCER_name = zend_string_init_interned("TYPE_LOAD_BALANCER", sizeof("TYPE_LOAD_BALANCER") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_LOAD_BALANCER_name, &const_TYPE_LOAD_BALANCER_value, ZEND_ACC_PUBLIC, NULL); diff --git a/src/MongoDB/Session_arginfo.h b/src/MongoDB/Session_arginfo.h index 228dde0e0..b2be349a6 100644 --- a/src/MongoDB/Session_arginfo.h +++ b/src/MongoDB/Session_arginfo.h @@ -114,35 +114,35 @@ static zend_class_entry *register_class_MongoDB_Driver_Session(void) class_entry->ce_flags |= ZEND_ACC_FINAL; zval const_TRANSACTION_NONE_value; - zend_string *const_TRANSACTION_NONE_value_str = zend_string_init(PHONGO_TRANSACTION_NONE, sizeof(PHONGO_TRANSACTION_NONE) - 1, 1); + zend_string *const_TRANSACTION_NONE_value_str = zend_string_init(PHONGO_TRANSACTION_NONE, strlen(PHONGO_TRANSACTION_NONE), 1); ZVAL_STR(&const_TRANSACTION_NONE_value, const_TRANSACTION_NONE_value_str); zend_string *const_TRANSACTION_NONE_name = zend_string_init_interned("TRANSACTION_NONE", sizeof("TRANSACTION_NONE") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TRANSACTION_NONE_name, &const_TRANSACTION_NONE_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TRANSACTION_NONE_name); zval const_TRANSACTION_STARTING_value; - zend_string *const_TRANSACTION_STARTING_value_str = zend_string_init(PHONGO_TRANSACTION_STARTING, sizeof(PHONGO_TRANSACTION_STARTING) - 1, 1); + zend_string *const_TRANSACTION_STARTING_value_str = zend_string_init(PHONGO_TRANSACTION_STARTING, strlen(PHONGO_TRANSACTION_STARTING), 1); ZVAL_STR(&const_TRANSACTION_STARTING_value, const_TRANSACTION_STARTING_value_str); zend_string *const_TRANSACTION_STARTING_name = zend_string_init_interned("TRANSACTION_STARTING", sizeof("TRANSACTION_STARTING") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TRANSACTION_STARTING_name, &const_TRANSACTION_STARTING_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TRANSACTION_STARTING_name); zval const_TRANSACTION_IN_PROGRESS_value; - zend_string *const_TRANSACTION_IN_PROGRESS_value_str = zend_string_init(PHONGO_TRANSACTION_IN_PROGRESS, sizeof(PHONGO_TRANSACTION_IN_PROGRESS) - 1, 1); + zend_string *const_TRANSACTION_IN_PROGRESS_value_str = zend_string_init(PHONGO_TRANSACTION_IN_PROGRESS, strlen(PHONGO_TRANSACTION_IN_PROGRESS), 1); ZVAL_STR(&const_TRANSACTION_IN_PROGRESS_value, const_TRANSACTION_IN_PROGRESS_value_str); zend_string *const_TRANSACTION_IN_PROGRESS_name = zend_string_init_interned("TRANSACTION_IN_PROGRESS", sizeof("TRANSACTION_IN_PROGRESS") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TRANSACTION_IN_PROGRESS_name, &const_TRANSACTION_IN_PROGRESS_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TRANSACTION_IN_PROGRESS_name); zval const_TRANSACTION_COMMITTED_value; - zend_string *const_TRANSACTION_COMMITTED_value_str = zend_string_init(PHONGO_TRANSACTION_COMMITTED, sizeof(PHONGO_TRANSACTION_COMMITTED) - 1, 1); + zend_string *const_TRANSACTION_COMMITTED_value_str = zend_string_init(PHONGO_TRANSACTION_COMMITTED, strlen(PHONGO_TRANSACTION_COMMITTED), 1); ZVAL_STR(&const_TRANSACTION_COMMITTED_value, const_TRANSACTION_COMMITTED_value_str); zend_string *const_TRANSACTION_COMMITTED_name = zend_string_init_interned("TRANSACTION_COMMITTED", sizeof("TRANSACTION_COMMITTED") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TRANSACTION_COMMITTED_name, &const_TRANSACTION_COMMITTED_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TRANSACTION_COMMITTED_name); zval const_TRANSACTION_ABORTED_value; - zend_string *const_TRANSACTION_ABORTED_value_str = zend_string_init(PHONGO_TRANSACTION_ABORTED, sizeof(PHONGO_TRANSACTION_ABORTED) - 1, 1); + zend_string *const_TRANSACTION_ABORTED_value_str = zend_string_init(PHONGO_TRANSACTION_ABORTED, strlen(PHONGO_TRANSACTION_ABORTED), 1); ZVAL_STR(&const_TRANSACTION_ABORTED_value, const_TRANSACTION_ABORTED_value_str); zend_string *const_TRANSACTION_ABORTED_name = zend_string_init_interned("TRANSACTION_ABORTED", sizeof("TRANSACTION_ABORTED") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TRANSACTION_ABORTED_name, &const_TRANSACTION_ABORTED_value, ZEND_ACC_PUBLIC, NULL); diff --git a/src/MongoDB/TopologyDescription_arginfo.h b/src/MongoDB/TopologyDescription_arginfo.h index 5dd72cd7f..562032636 100644 --- a/src/MongoDB/TopologyDescription_arginfo.h +++ b/src/MongoDB/TopologyDescription_arginfo.h @@ -48,42 +48,42 @@ static zend_class_entry *register_class_MongoDB_Driver_TopologyDescription(void) class_entry->ce_flags |= ZEND_ACC_FINAL; zval const_TYPE_UNKNOWN_value; - zend_string *const_TYPE_UNKNOWN_value_str = zend_string_init(PHONGO_TOPOLOGY_UNKNOWN, sizeof(PHONGO_TOPOLOGY_UNKNOWN) - 1, 1); + zend_string *const_TYPE_UNKNOWN_value_str = zend_string_init(PHONGO_TOPOLOGY_UNKNOWN, strlen(PHONGO_TOPOLOGY_UNKNOWN), 1); ZVAL_STR(&const_TYPE_UNKNOWN_value, const_TYPE_UNKNOWN_value_str); zend_string *const_TYPE_UNKNOWN_name = zend_string_init_interned("TYPE_UNKNOWN", sizeof("TYPE_UNKNOWN") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_UNKNOWN_name, &const_TYPE_UNKNOWN_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_UNKNOWN_name); zval const_TYPE_SINGLE_value; - zend_string *const_TYPE_SINGLE_value_str = zend_string_init(PHONGO_TOPOLOGY_SINGLE, sizeof(PHONGO_TOPOLOGY_SINGLE) - 1, 1); + zend_string *const_TYPE_SINGLE_value_str = zend_string_init(PHONGO_TOPOLOGY_SINGLE, strlen(PHONGO_TOPOLOGY_SINGLE), 1); ZVAL_STR(&const_TYPE_SINGLE_value, const_TYPE_SINGLE_value_str); zend_string *const_TYPE_SINGLE_name = zend_string_init_interned("TYPE_SINGLE", sizeof("TYPE_SINGLE") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_SINGLE_name, &const_TYPE_SINGLE_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_SINGLE_name); zval const_TYPE_SHARDED_value; - zend_string *const_TYPE_SHARDED_value_str = zend_string_init(PHONGO_TOPOLOGY_SHARDED, sizeof(PHONGO_TOPOLOGY_SHARDED) - 1, 1); + zend_string *const_TYPE_SHARDED_value_str = zend_string_init(PHONGO_TOPOLOGY_SHARDED, strlen(PHONGO_TOPOLOGY_SHARDED), 1); ZVAL_STR(&const_TYPE_SHARDED_value, const_TYPE_SHARDED_value_str); zend_string *const_TYPE_SHARDED_name = zend_string_init_interned("TYPE_SHARDED", sizeof("TYPE_SHARDED") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_SHARDED_name, &const_TYPE_SHARDED_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_SHARDED_name); zval const_TYPE_REPLICA_SET_NO_PRIMARY_value; - zend_string *const_TYPE_REPLICA_SET_NO_PRIMARY_value_str = zend_string_init(PHONGO_TOPOLOGY_REPLICA_SET_NO_PRIMARY, sizeof(PHONGO_TOPOLOGY_REPLICA_SET_NO_PRIMARY) - 1, 1); + zend_string *const_TYPE_REPLICA_SET_NO_PRIMARY_value_str = zend_string_init(PHONGO_TOPOLOGY_REPLICA_SET_NO_PRIMARY, strlen(PHONGO_TOPOLOGY_REPLICA_SET_NO_PRIMARY), 1); ZVAL_STR(&const_TYPE_REPLICA_SET_NO_PRIMARY_value, const_TYPE_REPLICA_SET_NO_PRIMARY_value_str); zend_string *const_TYPE_REPLICA_SET_NO_PRIMARY_name = zend_string_init_interned("TYPE_REPLICA_SET_NO_PRIMARY", sizeof("TYPE_REPLICA_SET_NO_PRIMARY") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_REPLICA_SET_NO_PRIMARY_name, &const_TYPE_REPLICA_SET_NO_PRIMARY_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_REPLICA_SET_NO_PRIMARY_name); zval const_TYPE_REPLICA_SET_WITH_PRIMARY_value; - zend_string *const_TYPE_REPLICA_SET_WITH_PRIMARY_value_str = zend_string_init(PHONGO_TOPOLOGY_REPLICA_SET_WITH_PRIMARY, sizeof(PHONGO_TOPOLOGY_REPLICA_SET_WITH_PRIMARY) - 1, 1); + zend_string *const_TYPE_REPLICA_SET_WITH_PRIMARY_value_str = zend_string_init(PHONGO_TOPOLOGY_REPLICA_SET_WITH_PRIMARY, strlen(PHONGO_TOPOLOGY_REPLICA_SET_WITH_PRIMARY), 1); ZVAL_STR(&const_TYPE_REPLICA_SET_WITH_PRIMARY_value, const_TYPE_REPLICA_SET_WITH_PRIMARY_value_str); zend_string *const_TYPE_REPLICA_SET_WITH_PRIMARY_name = zend_string_init_interned("TYPE_REPLICA_SET_WITH_PRIMARY", sizeof("TYPE_REPLICA_SET_WITH_PRIMARY") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_REPLICA_SET_WITH_PRIMARY_name, &const_TYPE_REPLICA_SET_WITH_PRIMARY_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_TYPE_REPLICA_SET_WITH_PRIMARY_name); zval const_TYPE_LOAD_BALANCED_value; - zend_string *const_TYPE_LOAD_BALANCED_value_str = zend_string_init(PHONGO_TOPOLOGY_LOAD_BALANCED, sizeof(PHONGO_TOPOLOGY_LOAD_BALANCED) - 1, 1); + zend_string *const_TYPE_LOAD_BALANCED_value_str = zend_string_init(PHONGO_TOPOLOGY_LOAD_BALANCED, strlen(PHONGO_TOPOLOGY_LOAD_BALANCED), 1); ZVAL_STR(&const_TYPE_LOAD_BALANCED_value, const_TYPE_LOAD_BALANCED_value_str); zend_string *const_TYPE_LOAD_BALANCED_name = zend_string_init_interned("TYPE_LOAD_BALANCED", sizeof("TYPE_LOAD_BALANCED") - 1, 1); zend_declare_class_constant_ex(class_entry, const_TYPE_LOAD_BALANCED_name, &const_TYPE_LOAD_BALANCED_value, ZEND_ACC_PUBLIC, NULL); diff --git a/src/functions_arginfo.h b/src/functions_arginfo.h index cb9a50f19..336ebd2bf 100644 --- a/src/functions_arginfo.h +++ b/src/functions_arginfo.h @@ -46,44 +46,44 @@ ZEND_END_ARG_INFO() #define arginfo_MongoDB_Driver_Monitoring_removeSubscriber arginfo_MongoDB_Driver_Monitoring_addSubscriber -ZEND_FUNCTION(fromJSON); +ZEND_FUNCTION(MongoDB_BSON_fromJSON); #if PHP_VERSION_ID >= 80000 -ZEND_FUNCTION(fromPHP); +ZEND_FUNCTION(MongoDB_BSON_fromPHP); #endif #if !(PHP_VERSION_ID >= 80000) -ZEND_FUNCTION(fromPHP); +ZEND_FUNCTION(MongoDB_BSON_fromPHP); #endif -ZEND_FUNCTION(toCanonicalExtendedJSON); -ZEND_FUNCTION(toJSON); +ZEND_FUNCTION(MongoDB_BSON_toCanonicalExtendedJSON); +ZEND_FUNCTION(MongoDB_BSON_toJSON); #if PHP_VERSION_ID >= 80000 -ZEND_FUNCTION(toPHP); +ZEND_FUNCTION(MongoDB_BSON_toPHP); #endif #if !(PHP_VERSION_ID >= 80000) -ZEND_FUNCTION(toPHP); +ZEND_FUNCTION(MongoDB_BSON_toPHP); #endif -ZEND_FUNCTION(toRelaxedExtendedJSON); -ZEND_FUNCTION(addSubscriber); -ZEND_FUNCTION(removeSubscriber); +ZEND_FUNCTION(MongoDB_BSON_toRelaxedExtendedJSON); +ZEND_FUNCTION(MongoDB_Driver_Monitoring_addSubscriber); +ZEND_FUNCTION(MongoDB_Driver_Monitoring_removeSubscriber); static const zend_function_entry ext_functions[] = { - ZEND_NS_FE("MongoDB\\BSON", fromJSON, arginfo_MongoDB_BSON_fromJSON) + ZEND_NS_FALIAS("MongoDB\\BSON", fromJSON, MongoDB_BSON_fromJSON, arginfo_MongoDB_BSON_fromJSON) #if PHP_VERSION_ID >= 80000 - ZEND_NS_FE("MongoDB\\BSON", fromPHP, arginfo_MongoDB_BSON_fromPHP) + ZEND_NS_FALIAS("MongoDB\\BSON", fromPHP, MongoDB_BSON_fromPHP, arginfo_MongoDB_BSON_fromPHP) #endif #if !(PHP_VERSION_ID >= 80000) - ZEND_NS_FE("MongoDB\\BSON", fromPHP, arginfo_MongoDB_BSON_fromPHP) + ZEND_NS_FALIAS("MongoDB\\BSON", fromPHP, MongoDB_BSON_fromPHP, arginfo_MongoDB_BSON_fromPHP) #endif - ZEND_NS_FE("MongoDB\\BSON", toCanonicalExtendedJSON, arginfo_MongoDB_BSON_toCanonicalExtendedJSON) - ZEND_NS_FE("MongoDB\\BSON", toJSON, arginfo_MongoDB_BSON_toJSON) + ZEND_NS_FALIAS("MongoDB\\BSON", toCanonicalExtendedJSON, MongoDB_BSON_toCanonicalExtendedJSON, arginfo_MongoDB_BSON_toCanonicalExtendedJSON) + ZEND_NS_FALIAS("MongoDB\\BSON", toJSON, MongoDB_BSON_toJSON, arginfo_MongoDB_BSON_toJSON) #if PHP_VERSION_ID >= 80000 - ZEND_NS_FE("MongoDB\\BSON", toPHP, arginfo_MongoDB_BSON_toPHP) + ZEND_NS_FALIAS("MongoDB\\BSON", toPHP, MongoDB_BSON_toPHP, arginfo_MongoDB_BSON_toPHP) #endif #if !(PHP_VERSION_ID >= 80000) - ZEND_NS_FE("MongoDB\\BSON", toPHP, arginfo_MongoDB_BSON_toPHP) + ZEND_NS_FALIAS("MongoDB\\BSON", toPHP, MongoDB_BSON_toPHP, arginfo_MongoDB_BSON_toPHP) #endif - ZEND_NS_FE("MongoDB\\BSON", toRelaxedExtendedJSON, arginfo_MongoDB_BSON_toRelaxedExtendedJSON) - ZEND_NS_FE("MongoDB\\Driver\\Monitoring", addSubscriber, arginfo_MongoDB_Driver_Monitoring_addSubscriber) - ZEND_NS_FE("MongoDB\\Driver\\Monitoring", removeSubscriber, arginfo_MongoDB_Driver_Monitoring_removeSubscriber) + ZEND_NS_FALIAS("MongoDB\\BSON", toRelaxedExtendedJSON, MongoDB_BSON_toRelaxedExtendedJSON, arginfo_MongoDB_BSON_toRelaxedExtendedJSON) + ZEND_NS_FALIAS("MongoDB\\Driver\\Monitoring", addSubscriber, MongoDB_Driver_Monitoring_addSubscriber, arginfo_MongoDB_Driver_Monitoring_addSubscriber) + ZEND_NS_FALIAS("MongoDB\\Driver\\Monitoring", removeSubscriber, MongoDB_Driver_Monitoring_removeSubscriber, arginfo_MongoDB_Driver_Monitoring_removeSubscriber) ZEND_FE_END };