@@ -47,8 +47,8 @@ zend_class_entry *php_uri_ce_whatwg_url_validation_error;
4747static zend_object_handlers object_handlers_rfc3986_uri ;
4848static zend_object_handlers object_handlers_whatwg_uri ;
4949
50- typedef bool (* php_uri_string_component_validator )(const zend_string * component );
51- typedef bool (* php_uri_long_component_validator )(zend_long component );
50+ typedef bool (* php_uri_component_validator_string )(const zend_string * component );
51+ typedef bool (* php_uri_component_validator_long )(zend_long component );
5252
5353static const zend_module_dep uri_deps [] = {
5454 ZEND_MOD_REQUIRED ("lexbor" )
@@ -1060,7 +1060,7 @@ PHP_METHOD(Uri_Rfc3986_UriBuilder, reset)
10601060 zend_update_property_null (php_uri_ce_rfc3986_uri_builder , Z_OBJ_P (ZEND_THIS ), ZEND_STRL ("scheme "));
10611061 zend_update_property_null (php_uri_ce_rfc3986_uri_builder , Z_OBJ_P (ZEND_THIS ), ZEND_STRL ("userinfo "));
10621062 zend_update_property_null (php_uri_ce_rfc3986_uri_builder , Z_OBJ_P (ZEND_THIS ), ZEND_STRL ("host "));
1063- zend_update_property_stringl (php_uri_ce_rfc3986_uri_builder , Z_OBJ_P (ZEND_THIS ), ZEND_STRL ("path "), "", 0 );
1063+ zend_update_property_str (php_uri_ce_rfc3986_uri_builder , Z_OBJ_P (ZEND_THIS ), ZEND_STRL ("path "), ZSTR_EMPTY_ALLOC () );
10641064 zend_update_property_null (php_uri_ce_rfc3986_uri_builder , Z_OBJ_P (ZEND_THIS ), ZEND_STRL ("query "));
10651065 zend_update_property_null (php_uri_ce_rfc3986_uri_builder , Z_OBJ_P (ZEND_THIS ), ZEND_STRL ("fragment "));
10661066
@@ -1069,7 +1069,7 @@ PHP_METHOD(Uri_Rfc3986_UriBuilder, reset)
10691069
10701070ZEND_ATTRIBUTE_NONNULL static void php_uri_builder_set_component_string (
10711071 INTERNAL_FUNCTION_PARAMETERS , const char * name , size_t name_length ,
1072- const php_uri_string_component_validator validator
1072+ const php_uri_component_validator_string validator
10731073) {
10741074 zend_string * component ;
10751075
@@ -1089,7 +1089,7 @@ ZEND_ATTRIBUTE_NONNULL static void php_uri_builder_set_component_string(
10891089
10901090ZEND_ATTRIBUTE_NONNULL static void php_uri_builder_set_component_string_or_null (
10911091 INTERNAL_FUNCTION_PARAMETERS , const char * name , size_t name_length ,
1092- const php_uri_string_component_validator validator
1092+ const php_uri_component_validator_string validator
10931093) {
10941094 zend_string * component ;
10951095
@@ -1113,7 +1113,7 @@ ZEND_ATTRIBUTE_NONNULL static void php_uri_builder_set_component_string_or_null(
11131113
11141114ZEND_ATTRIBUTE_NONNULL_ARGS (1 ) static void php_uri_builder_set_component_long_or_null (
11151115 INTERNAL_FUNCTION_PARAMETERS , const char * name , size_t name_length ,
1116- const php_uri_long_component_validator validator
1116+ const php_uri_component_validator_long validator
11171117) {
11181118 zend_long component ;
11191119 bool component_is_null ;
@@ -1209,15 +1209,14 @@ PHP_METHOD(Uri_Rfc3986_UriBuilder, build)
12091209 ZEND_PARSE_PARAMETERS_END ();
12101210
12111211 zend_object * obj = Z_OBJ_P (ZEND_THIS );
1212- zval tmp ;
12131212
1214- const zval * scheme = zend_read_property (obj -> ce , obj , ZEND_STRL ( "scheme" ), false, & tmp );
1215- const zval * userinfo = zend_read_property (obj -> ce , obj , ZEND_STRL ( "userinfo" ), false, & tmp );
1216- const zval * host = zend_read_property (obj -> ce , obj , ZEND_STRL ( "host" ), false, & tmp );
1217- const zval * port = zend_read_property (obj -> ce , obj , ZEND_STRL ( "port" ), false, & tmp );
1218- const zval * path = zend_read_property (obj -> ce , obj , ZEND_STRL ( "path" ), false, & tmp );
1219- const zval * query = zend_read_property (obj -> ce , obj , ZEND_STRL ( "query" ), false, & tmp );
1220- const zval * fragment = zend_read_property (obj -> ce , obj , ZEND_STRL ( "fragment" ), false, & tmp );
1213+ const zval * scheme = OBJ_PROP_NUM (obj , 0 );
1214+ const zval * userinfo = OBJ_PROP_NUM (obj , 1 );
1215+ const zval * host = OBJ_PROP_NUM (obj , 2 );
1216+ const zval * port = OBJ_PROP_NUM (obj , 3 );
1217+ const zval * path = OBJ_PROP_NUM (obj , 4 );
1218+ const zval * query = OBJ_PROP_NUM (obj , 5 );
1219+ const zval * fragment = OBJ_PROP_NUM (obj , 6 );
12211220
12221221 zend_string * uri_str = php_uri_parser_rfc3986_recompose_from_zval (scheme , userinfo , host , port , path , query , fragment );
12231222 if (uri_str == NULL ) {
0 commit comments