From: Anatoliy Belsky Date: Sun, 29 Sep 2013 21:31:25 +0000 (+0000) Subject: fixed struct init X-Git-Tag: RELEASE_2_1_0_RC3~10^2^2~19 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=cc74cdc4ff1334afa39ff12001ba94309346df54;p=m6w6%2Fext-http fixed struct init --- diff --git a/php_http_client.c b/php_http_client.c index 2306b04..dc97290 100644 --- a/php_http_client.c +++ b/php_http_client.c @@ -612,13 +612,13 @@ static PHP_METHOD(HttpClient, enqueue) if (php_http_client_enqueued(obj->client, msg_obj->message, NULL)) { php_http_error(HE_WARNING, PHP_HTTP_E_CLIENT, "Failed to enqueue request; request already in queue"); } else { - php_http_client_enqueue_t q = { - msg_obj->message, - combined_options(getThis(), request TSRMLS_CC), - msg_queue_dtor, - msg_obj, - {fci, fcc} - }; + php_http_client_enqueue_t q; + q.request = msg_obj->message; + q.options = combined_options(getThis(), request TSRMLS_CC); + q.dtor = msg_queue_dtor; + q.opaque = msg_obj; + q.closure.fci = fci; + q.closure.fcc = fcc; if (fci.size) { Z_ADDREF_P(fci.function_name); @@ -669,13 +669,13 @@ static PHP_METHOD(HttpClient, requeue) if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|f", &request, php_http_client_request_class_entry, &fci, &fcc)) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); php_http_message_object_t *msg_obj = zend_object_store_get_object(request TSRMLS_CC); - php_http_client_enqueue_t q = { - msg_obj->message, - combined_options(getThis(), request TSRMLS_CC), - msg_queue_dtor, - msg_obj, - {fci, fcc} - }; + php_http_client_enqueue_t q; + q.request = msg_obj->message; + q.options = combined_options(getThis(), request TSRMLS_CC); + q.dtor = msg_queue_dtor; + q.opaque = msg_obj; + q.closure.fci = fci; + q.closure.fcc = fcc; if (fci.size) { Z_ADDREF_P(fci.function_name);