Skip to content

Commit

Permalink
optimize code [2]
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Jul 23, 2024
1 parent 5df6776 commit 8f2a8ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext-src/swoole_http_cookie.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static PHP_METHOD(swoole_http_cookie, __construct) {

#define PHP_METHOD_HTTP_COOKIE_WITH_STR(field) \
zend_string *field; \
HttpCookie *cookie = php_swoole_http_get_cookie(ZEND_THIS); \
HttpCookie *cookie = php_swoole_http_get_cooke_safety(ZEND_THIS); \
\
ZEND_PARSE_PARAMETERS_START(1, 1) \
Z_PARAM_STR(field) \
Expand Down Expand Up @@ -382,7 +382,7 @@ static PHP_METHOD(swoole_http_cookie, withValue) {

static PHP_METHOD(swoole_http_cookie, withExpires) {
zend_long expires = 0;
HttpCookie *cookie = php_swoole_http_get_cookie(ZEND_THIS);
HttpCookie *cookie = php_swoole_http_get_cooke_safety(ZEND_THIS);

ZEND_PARSE_PARAMETERS_START(0, 1)
Z_PARAM_OPTIONAL
Expand Down

0 comments on commit 8f2a8ac

Please sign in to comment.