projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
* Added request options:
[m6w6/ext-http]
/
http_cookie_api.c
diff --git
a/http_cookie_api.c
b/http_cookie_api.c
index f1710c3999e6b710ad48c439a2e2540ed3ae106a..2f0d6c55fc7c57144aab811e6b8853667c2df035 100644
(file)
--- a/
http_cookie_api.c
+++ b/
http_cookie_api.c
@@
-249,9
+249,12
@@
PHP_HTTP_API http_cookie_list *_http_cookie_list_fromstruct(http_cookie_list *li
list->flags = (long) Z_DVAL_PP(tmp);
break;
case IS_STRING:
list->flags = (long) Z_DVAL_PP(tmp);
break;
case IS_STRING:
- cpy = zval_copy(IS_LONG, *tmp);
- list->flags = Z_LVAL_P(cpy);
- zval_free(&cpy);
+ cpy = *tmp;
+ convert_to_long_ex(&cpy);
+ list->flags = Z_LVAL_PP(tmp);
+ if (cpy != *tmp) {
+ zval_ptr_dtor(&cpy);
+ }
break;
default:
break;
break;
default:
break;
@@
-266,7
+269,8
@@
PHP_HTTP_API http_cookie_list *_http_cookie_list_fromstruct(http_cookie_list *li
list->expires = (long) Z_DVAL_PP(tmp);
break;
case IS_STRING:
list->expires = (long) Z_DVAL_PP(tmp);
break;
case IS_STRING:
- cpy = zval_copy(IS_LONG, *tmp);
+ cpy = *tmp;
+ convert_to_long_ex(&cpy);
if (Z_LVAL_P(cpy)) {
list->expires = Z_LVAL_P(cpy);
} else {
if (Z_LVAL_P(cpy)) {
list->expires = Z_LVAL_P(cpy);
} else {
@@
-275,7
+279,9
@@
PHP_HTTP_API http_cookie_list *_http_cookie_list_fromstruct(http_cookie_list *li
list->expires = expires;
}
}
list->expires = expires;
}
}
- zval_free(&cpy);
+ if (cpy != *tmp) {
+ zval_ptr_dtor(&cpy);
+ }
break;
default:
break;
break;
default:
break;