projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge branch 'master' into phpng
[m6w6/ext-http]
/
php_http_cookie.c
diff --git
a/php_http_cookie.c
b/php_http_cookie.c
index a43928b833f2f647813a24adedf1d8e4d9188754..ff67b1c1d2c6ed2a189f2e18647b9db196ac53b2 100644
(file)
--- a/
php_http_cookie.c
+++ b/
php_http_cookie.c
@@
-235,16
+235,16
@@
php_http_cookie_list_t *php_http_cookie_list_from_struct(php_http_cookie_list_t
ht = HASH_OF(strct);
list = php_http_cookie_list_init(list);
ht = HASH_OF(strct);
list = php_http_cookie_list_init(list);
- if ((tmp = zend_hash_str_find(ht, ZEND_STRL("cookies"))) && Z_TYPE_P(tmp) == IS_ARRAY){
+ if ((tmp = zend_hash_str_find
_ind
(ht, ZEND_STRL("cookies"))) && Z_TYPE_P(tmp) == IS_ARRAY){
array_copy(Z_ARRVAL_P(tmp), &list->cookies);
}
array_copy(Z_ARRVAL_P(tmp), &list->cookies);
}
- if ((tmp = zend_hash_str_find(ht, ZEND_STRL("extras"))) && Z_TYPE_P(tmp) == IS_ARRAY){
+ if ((tmp = zend_hash_str_find
_ind
(ht, ZEND_STRL("extras"))) && Z_TYPE_P(tmp) == IS_ARRAY){
array_copy(Z_ARRVAL_P(tmp), &list->extras);
}
array_copy(Z_ARRVAL_P(tmp), &list->extras);
}
- if ((tmp = zend_hash_str_find(ht, ZEND_STRL("flags")))) {
+ if ((tmp = zend_hash_str_find
_ind
(ht, ZEND_STRL("flags")))) {
list->flags = zval_get_long(tmp);
}
list->flags = zval_get_long(tmp);
}
- if ((tmp = zend_hash_str_find(ht, ZEND_STRL("expires")))) {
+ if ((tmp = zend_hash_str_find
_ind
(ht, ZEND_STRL("expires")))) {
if (Z_TYPE_P(tmp) == IS_LONG) {
list->expires = Z_LVAL_P(tmp);
} else {
if (Z_TYPE_P(tmp) == IS_LONG) {
list->expires = Z_LVAL_P(tmp);
} else {
@@
-260,7
+260,7
@@
php_http_cookie_list_t *php_http_cookie_list_from_struct(php_http_cookie_list_t
zend_string_release(lstr);
}
}
zend_string_release(lstr);
}
}
- if ((tmp = zend_hash_str_find(ht, ZEND_STRL("max-age")))) {
+ if ((tmp = zend_hash_str_find
_ind
(ht, ZEND_STRL("max-age")))) {
if (Z_TYPE_P(tmp) == IS_LONG) {
list->max_age = Z_LVAL_P(tmp);
} else {
if (Z_TYPE_P(tmp) == IS_LONG) {
list->max_age = Z_LVAL_P(tmp);
} else {
@@
-274,13
+274,13
@@
php_http_cookie_list_t *php_http_cookie_list_from_struct(php_http_cookie_list_t
zend_string_release(lstr);
}
}
zend_string_release(lstr);
}
}
- if ((tmp = zend_hash_str_find(ht, ZEND_STRL("path")))) {
+ if ((tmp = zend_hash_str_find
_ind
(ht, ZEND_STRL("path")))) {
zend_string *str = zval_get_string(tmp);
list->path = estrndup(str->val, str->len);
zend_string_release(str);
}
zend_string *str = zval_get_string(tmp);
list->path = estrndup(str->val, str->len);
zend_string_release(str);
}
- if ((tmp = zend_hash_str_find(ht, ZEND_STRL("domain")))) {
+ if ((tmp = zend_hash_str_find
_ind
(ht, ZEND_STRL("domain")))) {
zend_string *str = zval_get_string(tmp);
list->domain = estrndup(str->val, str->len);
zend_string *str = zval_get_string(tmp);
list->domain = estrndup(str->val, str->len);
@@
-382,7
+382,7
@@
php_http_cookie_object_t *php_http_cookie_object_new_ex(zend_class_entry *ce, ph
ce = php_http_cookie_class_entry;
}
ce = php_http_cookie_class_entry;
}
- o = ecalloc(
sizeof(*o) + sizeof(zval) * (ce->default_properties_count - 1), 1
);
+ o = ecalloc(
1, sizeof(*o) + zend_object_properties_size(ce)
);
zend_object_std_init(&o->zo, ce);
object_properties_init(&o->zo, ce);
o->zo.handlers = &php_http_cookie_object_handlers;
zend_object_std_init(&o->zo, ce);
object_properties_init(&o->zo, ce);
o->zo.handlers = &php_http_cookie_object_handlers;