projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
flush wip
[m6w6/ext-http]
/
php_http_cookie.c
diff --git
a/php_http_cookie.c
b/php_http_cookie.c
index a43928b833f2f647813a24adedf1d8e4d9188754..df67af663df8176d621cca21af8471c2ca98d118 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;
@@
-532,7
+532,7
@@
static PHP_METHOD(HttpCookie, setCookies)
array_copy_strings(cookies, &obj->list->cookies);
}
array_copy_strings(cookies, &obj->list->cookies);
}
- RETURN_ZVAL
_FAST(getThis()
);
+ RETURN_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_addCookies, 0, 0, 1)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_addCookies, 0, 0, 1)
@@
-551,7
+551,7
@@
static PHP_METHOD(HttpCookie, addCookies)
array_join(cookies, &obj->list->cookies, 1, ARRAY_JOIN_STRONLY|ARRAY_JOIN_STRINGIFY);
array_join(cookies, &obj->list->cookies, 1, ARRAY_JOIN_STRONLY|ARRAY_JOIN_STRINGIFY);
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getExtras, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getExtras, 0, 0, 0)
@@
-591,7
+591,7
@@
static PHP_METHOD(HttpCookie, setExtras)
array_copy_strings(extras, &obj->list->extras);
}
array_copy_strings(extras, &obj->list->extras);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_addExtras, 0, 0, 1)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_addExtras, 0, 0, 1)
@@
-610,7
+610,7
@@
static PHP_METHOD(HttpCookie, addExtras)
array_join(extras, &obj->list->extras, 1, ARRAY_JOIN_STRONLY|ARRAY_JOIN_STRINGIFY);
array_join(extras, &obj->list->extras, 1, ARRAY_JOIN_STRONLY|ARRAY_JOIN_STRINGIFY);
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getCookie, 0, 0, 1)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getCookie, 0, 0, 1)
@@
-632,7
+632,7
@@
static PHP_METHOD(HttpCookie, getCookie)
PHP_HTTP_COOKIE_OBJECT_INIT(obj);
if (php_http_cookie_list_get_cookie(obj->list, name_str, name_len, &zvalue)) {
PHP_HTTP_COOKIE_OBJECT_INIT(obj);
if (php_http_cookie_list_get_cookie(obj->list, name_str, name_len, &zvalue)) {
- RETURN_ZVAL
_FAST(&zvalue
);
+ RETURN_ZVAL
(&zvalue, 1, 0
);
}
}
}
}
@@
-658,7
+658,7
@@
static PHP_METHOD(HttpCookie, setCookie)
php_http_cookie_list_add_cookie(obj->list, name_str, name_len, value_str, value_len);
}
php_http_cookie_list_add_cookie(obj->list, name_str, name_len, value_str, value_len);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_addCookie, 0, 0, 2)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_addCookie, 0, 0, 2)
@@
-679,7
+679,7
@@
static PHP_METHOD(HttpCookie, addCookie)
php_http_cookie_list_add_cookie(obj->list, name_str, name_len, value_str, value_len);
php_http_cookie_list_add_cookie(obj->list, name_str, name_len, value_str, value_len);
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getExtra, 0, 0, 1)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getExtra, 0, 0, 1)
@@
-701,7
+701,7
@@
static PHP_METHOD(HttpCookie, getExtra)
PHP_HTTP_COOKIE_OBJECT_INIT(obj);
if (php_http_cookie_list_get_extra(obj->list, name_str, name_len, &zvalue)) {
PHP_HTTP_COOKIE_OBJECT_INIT(obj);
if (php_http_cookie_list_get_extra(obj->list, name_str, name_len, &zvalue)) {
- RETURN_ZVAL
_FAST(&zvalue
);
+ RETURN_ZVAL
(&zvalue, 1, 0
);
}
}
}
}
@@
-727,7
+727,7
@@
static PHP_METHOD(HttpCookie, setExtra)
php_http_cookie_list_add_extra(obj->list, name_str, name_len, value_str, value_len);
}
php_http_cookie_list_add_extra(obj->list, name_str, name_len, value_str, value_len);
}
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_addExtra, 0, 0, 2)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_addExtra, 0, 0, 2)
@@
-748,7
+748,7
@@
static PHP_METHOD(HttpCookie, addExtra)
php_http_cookie_list_add_extra(obj->list, name_str, name_len, value_str, value_len);
php_http_cookie_list_add_extra(obj->list, name_str, name_len, value_str, value_len);
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getDomain, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getDomain, 0, 0, 0)
@@
-787,7
+787,7
@@
static PHP_METHOD(HttpCookie, setDomain)
PTR_SET(obj->list->domain, domain_str ? estrndup(domain_str, domain_len) : NULL);
PTR_SET(obj->list->domain, domain_str ? estrndup(domain_str, domain_len) : NULL);
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getPath, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getPath, 0, 0, 0)
@@
-826,7
+826,7
@@
static PHP_METHOD(HttpCookie, setPath)
PTR_SET(obj->list->path, path_str ? estrndup(path_str, path_len) : NULL);
PTR_SET(obj->list->path, path_str ? estrndup(path_str, path_len) : NULL);
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getExpires, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getExpires, 0, 0, 0)
@@
-862,7
+862,7
@@
static PHP_METHOD(HttpCookie, setExpires)
obj->list->expires = ts;
obj->list->expires = ts;
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getMaxAge, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getMaxAge, 0, 0, 0)
@@
-898,7
+898,7
@@
static PHP_METHOD(HttpCookie, setMaxAge)
obj->list->max_age = ma;
obj->list->max_age = ma;
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getFlags, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_getFlags, 0, 0, 0)
@@
-934,7
+934,7
@@
static PHP_METHOD(HttpCookie, setFlags)
obj->list->flags = flags;
obj->list->flags = flags;
- RETVAL_ZVAL
_FAST(getThis()
);
+ RETVAL_ZVAL
(getThis(), 1, 0
);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_toString, 0, 0, 0)
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_toString, 0, 0, 0)