X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_client.c;h=29da4c90ec4788b592e027742f59550a9bd437e7;hb=b4920d7ad19ae6704e10cb29fca652b47e1bc61f;hp=80de97724fa72300180653f5ab784605a99da534;hpb=7ba90c6d9d6843549fb9227d1a7aa05033e60772;p=m6w6%2Fext-http diff --git a/php_http_client.c b/php_http_client.c index 80de977..29da4c9 100644 --- a/php_http_client.c +++ b/php_http_client.c @@ -32,11 +32,11 @@ PHP_HTTP_API php_http_client_t *php_http_client_init(php_http_client_t *h, php_h } h->request.buffer = php_http_buffer_init(NULL); h->request.parser = php_http_message_parser_init(NULL TSRMLS_CC); - h->request.message = php_http_message_init(NULL, 0 TSRMLS_CC); + h->request.message = php_http_message_init(NULL, 0, NULL TSRMLS_CC); h->response.buffer = php_http_buffer_init(NULL); h->response.parser = php_http_message_parser_init(NULL TSRMLS_CC); - h->response.message = php_http_message_init(NULL, 0 TSRMLS_CC); + h->response.message = php_http_message_init(NULL, 0, NULL TSRMLS_CC); TSRMLS_SET_CTX(h->ts); @@ -100,11 +100,11 @@ PHP_HTTP_API php_http_client_t *php_http_client_copy(php_http_client_t *from, ph to->request.buffer = php_http_buffer_init(NULL); to->request.parser = php_http_message_parser_init(NULL TSRMLS_CC); - to->request.message = php_http_message_init(NULL, 0 TSRMLS_CC); + to->request.message = php_http_message_init(NULL, 0, NULL TSRMLS_CC); to->response.buffer = php_http_buffer_init(NULL); to->response.parser = php_http_message_parser_init(NULL TSRMLS_CC); - to->response.message = php_http_message_init(NULL, 0 TSRMLS_CC); + to->response.message = php_http_message_init(NULL, 0, NULL TSRMLS_CC); TSRMLS_SET_CTX(to->ts); @@ -395,7 +395,6 @@ STATUS php_http_client_object_handle_request(zval *zclient, zval **zreq TSRMLS_D php_http_client_progress_callback_t *callback = emalloc(sizeof(*callback)); callback->type = PHP_HTTP_CLIENT_PROGRESS_CALLBACK_USER; - callback->pass_state = 0; MAKE_STD_ZVAL(callback->func.user); array_init(callback->func.user); Z_ADDREF_P(zclient); @@ -453,7 +452,7 @@ STATUS php_http_client_object_handle_response(zval *zclient TSRMLS_DC) zend_update_property(php_http_client_class_entry, zclient, ZEND_STRL("responseMessage"), message TSRMLS_CC); zval_ptr_dtor(&message); - obj->client->response.message = php_http_message_init(NULL, 0 TSRMLS_CC); + obj->client->response.message = php_http_message_init(NULL, 0, NULL TSRMLS_CC); } else { zend_update_property_null(php_http_client_class_entry, zclient, ZEND_STRL("responseMessage") TSRMLS_CC); } @@ -470,7 +469,7 @@ STATUS php_http_client_object_handle_response(zval *zclient TSRMLS_DC) ZVAL_OBJVAL(message, php_http_message_object_new_ex(php_http_message_get_class_entry(), msg, NULL TSRMLS_CC), 0); zend_update_property(php_http_client_class_entry, zclient, ZEND_STRL("requestMessage"), message TSRMLS_CC); zval_ptr_dtor(&message); - obj->client->request.message = php_http_message_init(NULL, 0 TSRMLS_CC); + obj->client->request.message = php_http_message_init(NULL, 0, NULL TSRMLS_CC); } } @@ -933,7 +932,7 @@ PHP_METHOD(HttpClient, request) MAKE_STD_ZVAL(req); ZVAL_OBJVAL(req, ov, 0); - msg_obj->message = php_http_message_init(NULL, PHP_HTTP_REQUEST TSRMLS_CC); + msg_obj->message = php_http_message_init(NULL, PHP_HTTP_REQUEST, NULL TSRMLS_CC); PHP_HTTP_INFO(msg_obj->message).request.url = estrndup(url_str, url_len); PHP_HTTP_INFO(msg_obj->message).request.method = estrndup(meth_str, meth_len); @@ -984,7 +983,7 @@ PHP_METHOD(HttpClient, send) PHP_MINIT_FUNCTION(http_client) { - PHP_HTTP_REGISTER_CLASS(http\\Client, AbstractClient, http_client, php_http_object_get_class_entry(), ZEND_ACC_ABSTRACT); + PHP_HTTP_REGISTER_CLASS(http\\Client, AbstractClient, http_client, php_http_object_get_class_entry(), ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); php_http_client_class_entry->create_object = php_http_client_object_new; memcpy(&php_http_client_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); php_http_client_object_handlers.clone_obj = php_http_client_object_clone;