list->flags = (long) Z_DVAL_PP(tmp);
break;
case IS_STRING:
- cpy = php_http_zsep(IS_LONG, *tmp);
+ cpy = php_http_ztyp(IS_LONG, *tmp);
list->flags = Z_LVAL_P(cpy);
zval_ptr_dtor(&cpy);
break;
list->expires = (long) Z_DVAL_PP(tmp);
break;
case IS_STRING:
- cpy = php_http_zsep(IS_LONG, *tmp);
+ cpy = php_http_ztyp(IS_LONG, *tmp);
if (Z_LVAL_P(cpy)) {
list->expires = Z_LVAL_P(cpy);
} else {
FOREACH_HASH_KEYVAL(pos, &list->cookies, key, val) {
if (key.type == HASH_KEY_IS_STRING && key.len) {
- zval *tmp = php_http_zsep(IS_STRING, *val);
+ zval *tmp = php_http_ztyp(IS_STRING, *val);
append_encoded(&buf, key.str, key.len-1, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
zval_ptr_dtor(&tmp);
}
FOREACH_HASH_KEYVAL(pos, &list->extras, key, val) {
if (key.type == HASH_KEY_IS_STRING && key.len) {
- zval *tmp = php_http_zsep(IS_STRING, *val);
+ zval *tmp = php_http_ztyp(IS_STRING, *val);
append_encoded(&buf, key.str, key.len-1, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
zval_ptr_dtor(&tmp);
}
PHP_METHOD(HttpCookie, __construct)
{
- with_error_handling(EH_THROW, PHP_HTTP_EX_CE(runtime)) {
+ with_error_handling(EH_THROW, php_http_exception_class_entry) {
zval *zcookie = NULL;
long flags = 0;
HashTable *allowed_extras = NULL;
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z!lH", &zcookie, &flags, &allowed_extras)) {
if (zcookie) {
- with_error_handling(EH_THROW, PHP_HTTP_EX_CE(cookie)) {
+ with_error_handling(EH_THROW, php_http_exception_class_entry) {
char **ae = NULL;
php_http_cookie_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC);
ae = ae_ptr;
FOREACH_HASH_VAL(pos, allowed_extras, val) {
- zval *cpy = php_http_zsep(IS_STRING, *val);
+ zval *cpy = php_http_ztyp(IS_STRING, *val);
*ae_ptr++ = estrndup(Z_STRVAL_P(cpy), Z_STRLEN_P(cpy));
zval_ptr_dtor(&cpy);
obj->list = php_http_cookie_list_from_struct(obj->list, zcookie TSRMLS_CC);
break;
default: {
- zval *cpy = php_http_zsep(IS_STRING, zcookie);
+ zval *cpy = php_http_ztyp(IS_STRING, zcookie);
obj->list = php_http_cookie_list_parse(obj->list, Z_STRVAL_P(cpy), flags, ae TSRMLS_CC);
zval_ptr_dtor(&cpy);