Skip to content

Commit 67fa4c9

Browse files
committed
Some code review fixes
1 parent bf46c77 commit 67fa4c9

5 files changed

Lines changed: 8 additions & 20 deletions

File tree

ext/uri/php_uri.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,11 +1056,6 @@ PHP_METHOD(Uri_WhatWg_Url, __debugInfo)
10561056
RETURN_ARR(uri_get_debug_properties(uri_object));
10571057
}
10581058

1059-
PHP_METHOD(Uri_Rfc3986_UriBuilder, __construct)
1060-
{
1061-
ZEND_PARSE_PARAMETERS_NONE();
1062-
}
1063-
10641059
PHP_METHOD(Uri_Rfc3986_UriBuilder, reset)
10651060
{
10661061
ZEND_PARSE_PARAMETERS_NONE();

ext/uri/php_uri.stub.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ final class UriBuilder
5555
private ?string $query = null;
5656
private ?string $fragment = null;
5757

58-
public function __construct() {}
59-
6058
public function reset(): static {}
6159

6260
public function setScheme(?string $scheme): static {}

ext/uri/php_uri_arginfo.h

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/uri/php_uri_decl.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/uri/uri_parser_whatwg.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ static zend_always_inline void zval_string_or_null_to_lexbor_str(const zval *val
4343
static zend_always_inline void zval_long_or_null_to_lexbor_str(const zval *value, lexbor_str_t *lexbor_str)
4444
{
4545
if (Z_TYPE_P(value) == IS_LONG) {
46-
zval value_str;
47-
ZVAL_STR(&value_str, zend_long_to_str(Z_LVAL_P(value)));
48-
lexbor_str_init_append(lexbor_str, lexbor_parser.mraw, (const lxb_char_t *) Z_STRVAL(value_str), Z_STRLEN(value_str));
46+
zend_string *tmp = zend_long_to_str(Z_LVAL_P(value));
47+
lexbor_str_init_append(lexbor_str, lexbor_parser.mraw, (const lxb_char_t *) ZSTR_VAL(tmp), ZSTR_LEN(tmp));
48+
zend_string_release(tmp);
4949
} else {
5050
ZEND_ASSERT(Z_ISNULL_P(value));
5151
lexbor_str->data = (lxb_char_t *) "";

0 commit comments

Comments
 (0)