mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Purely cosmetic.
This commit is contained in:
parent
1b8ee02fd6
commit
c80f2bcba2
2 changed files with 10 additions and 9 deletions
|
@ -312,15 +312,17 @@ PHP_FUNCTION(curl_setopt)
|
||||||
ret = curl_easy_setopt(cp, option, fp);
|
ret = curl_easy_setopt(cp, option, fp);
|
||||||
|
|
||||||
if (option == CURLOPT_FILE) {
|
if (option == CURLOPT_FILE) {
|
||||||
CURLG(output_node) = &CURLG(output_start);
|
CURLG(output_node) = &CURLG(output_start);
|
||||||
|
|
||||||
while (CURLG(output_node)->next)
|
while (CURLG(output_node)->next)
|
||||||
CURLG(output_node) = CURLG(output_node)->next;
|
CURLG(output_node) = CURLG(output_node)->next;
|
||||||
|
|
||||||
CURLG(output_node)->next = (struct curl_fileid_table *)emalloc(sizeof(struct curl_fileid_table));
|
CURLG(output_node)->next = (struct curl_file_id_table *)emalloc(sizeof(struct curl_file_id_table));
|
||||||
CURLG(output_node) = CURLG(output_node)->next;
|
CURLG(output_node) = CURLG(output_node)->next;
|
||||||
CURLG(output_node)->id = Z_LVAL_PP(uCurlId);
|
CURLG(output_node)->id = Z_LVAL_PP(uCurlId);
|
||||||
CURLG(output_node)->next = NULL;
|
CURLG(output_node)->next = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_LONG(php_curl_error_translator(ret));
|
RETURN_LONG(php_curl_error_translator(ret));
|
||||||
|
@ -338,7 +340,7 @@ PHP_FUNCTION (curl_exec)
|
||||||
CURLLS_FETCH();
|
CURLLS_FETCH();
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 ||
|
if (ZEND_NUM_ARGS() != 1 ||
|
||||||
zend_get_parameters_ex (1, &uCurlId) == FAILURE) {
|
zend_get_parameters_ex(1, &uCurlId) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,12 +394,12 @@ PHP_FUNCTION (curl_close)
|
||||||
CURLLS_FETCH();
|
CURLLS_FETCH();
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 ||
|
if (ZEND_NUM_ARGS() != 1 ||
|
||||||
zend_get_parameters_ex (1, &uCurlId) == FAILURE) {
|
zend_get_parameters_ex(1, &uCurlId) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZEND_FETCH_RESOURCE(cp, CURL *, uCurlId, -1, "CURL Handle", CURLG(le_curl));
|
ZEND_FETCH_RESOURCE(cp, CURL *, uCurlId, -1, "CURL Handle", CURLG(le_curl));
|
||||||
zend_list_delete(Z_LVAL_PP (uCurlId));
|
zend_list_delete(Z_LVAL_PP(uCurlId));
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
|
@ -87,16 +87,15 @@ PHP_FUNCTION(curl_close);
|
||||||
#define CE_BAD_CALLING_ORDER 44
|
#define CE_BAD_CALLING_ORDER 44
|
||||||
#define C_LAST 45
|
#define C_LAST 45
|
||||||
|
|
||||||
struct curl_fileid_table
|
struct curl_file_id_table {
|
||||||
{
|
|
||||||
int id;
|
int id;
|
||||||
struct curl_fileid_table *next;
|
struct curl_file_id_table *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int use_file;
|
int use_file;
|
||||||
int le_curl;
|
int le_curl;
|
||||||
struct curl_fileid_table *output_node, output_start;
|
struct curl_file_id_table *output_node, output_start;
|
||||||
} php_curl_globals;
|
} php_curl_globals;
|
||||||
|
|
||||||
#ifdef ZTS
|
#ifdef ZTS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue