summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/curl_file.c21
-rw-r--r--ext/curl/interface.c87
-rw-r--r--ext/curl/multi.c33
-rw-r--r--ext/curl/share.c15
4 files changed, 52 insertions, 104 deletions
diff --git a/ext/curl/curl_file.c b/ext/curl/curl_file.c
index bb0449c179..7f31451f55 100644
--- a/ext/curl/curl_file.c
+++ b/ext/curl/curl_file.c
@@ -50,8 +50,7 @@ static void curlfile_ctor(INTERNAL_FUNCTION_PARAMETERS)
}
}
-/* {{{ proto CURLFile::__construct(string $name, [string $mimetype [, string $postfilename]])
- Create the CURLFile object */
+/* {{{ Create the CURLFile object */
ZEND_METHOD(CURLFile, __construct)
{
return_value = ZEND_THIS;
@@ -59,8 +58,7 @@ ZEND_METHOD(CURLFile, __construct)
}
/* }}} */
-/* {{{ proto CURLFile curl_file_create(string $name, [string $mimetype [, string $postfilename]])
- Create the CURLFile object */
+/* {{{ Create the CURLFile object */
PHP_FUNCTION(curl_file_create)
{
object_init_ex( return_value, curl_CURLFile_class );
@@ -88,40 +86,35 @@ static void curlfile_set_property(char *name, size_t name_len, INTERNAL_FUNCTION
zend_update_property_string(curl_CURLFile_class, ZEND_THIS, name, name_len, ZSTR_VAL(arg));
}
-/* {{{ proto string CURLFile::getFilename()
- Get file name */
+/* {{{ Get file name */
ZEND_METHOD(CURLFile, getFilename)
{
curlfile_get_property("name", sizeof("name")-1, INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
-/* {{{ proto string CURLFile::getMimeType()
- Get MIME type */
+/* {{{ Get MIME type */
ZEND_METHOD(CURLFile, getMimeType)
{
curlfile_get_property("mime", sizeof("mime")-1, INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
-/* {{{ proto string CURLFile::getPostFilename()
- Get file name for POST */
+/* {{{ Get file name for POST */
ZEND_METHOD(CURLFile, getPostFilename)
{
curlfile_get_property("postname", sizeof("postname")-1, INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
-/* {{{ proto void CURLFile::setMimeType(string $mime)
- Set MIME type */
+/* {{{ Set MIME type */
ZEND_METHOD(CURLFile, setMimeType)
{
curlfile_set_property("mime", sizeof("mime")-1, INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
-/* {{{ proto void CURLFile::setPostFilename(string $name)
- Set file name for POST */
+/* {{{ Set file name for POST */
ZEND_METHOD(CURLFile, setPostFilename)
{
curlfile_set_property("postname", sizeof("postname")-1, INTERNAL_FUNCTION_PARAM_PASSTHRU);
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index e17bfebc59..0c416774f2 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -210,8 +210,7 @@ void _php_curl_verify_handlers(php_curl *ch, int reporterror) /* {{{ */
}
/* }}} */
-/* {{{ curl_module_entry
- */
+/* {{{ curl_module_entry */
zend_module_entry curl_module_entry = {
STANDARD_MODULE_HEADER,
"curl",
@@ -250,8 +249,7 @@ PHP_INI_BEGIN()
PHP_INI_END()
/* }}} */
-/* {{{ PHP_MINFO_FUNCTION
- */
+/* {{{ PHP_MINFO_FUNCTION */
PHP_MINFO_FUNCTION(curl)
{
curl_version_info_data *d;
@@ -370,8 +368,7 @@ PHP_MINFO_FUNCTION(curl)
#define REGISTER_CURL_CONSTANT(__c) REGISTER_LONG_CONSTANT(#__c, __c, CONST_CS | CONST_PERSISTENT)
-/* {{{ PHP_MINIT_FUNCTION
- */
+/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(curl)
{
REGISTER_INI_ENTRIES();
@@ -1316,8 +1313,7 @@ int curl_cast_object(zend_object *obj, zval *result, int type)
return zend_std_cast_object_tostring(obj, result, type);
}
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
+/* {{{ PHP_MSHUTDOWN_FUNCTION */
PHP_MSHUTDOWN_FUNCTION(curl)
{
curl_global_cleanup();
@@ -1350,8 +1346,7 @@ static size_t curl_write_nothing(char *data, size_t size, size_t nmemb, void *ct
}
/* }}} */
-/* {{{ curl_write
- */
+/* {{{ curl_write */
static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
{
php_curl *ch = (php_curl *) ctx;
@@ -1413,8 +1408,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
}
/* }}} */
-/* {{{ curl_fnmatch
- */
+/* {{{ curl_fnmatch */
static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
{
php_curl *ch = (php_curl *) ctx;
@@ -1459,8 +1453,7 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
}
/* }}} */
-/* {{{ curl_progress
- */
+/* {{{ curl_progress */
static size_t curl_progress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
{
php_curl *ch = (php_curl *)clientp;
@@ -1513,8 +1506,7 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
}
/* }}} */
-/* {{{ curl_read
- */
+/* {{{ curl_read */
static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
{
php_curl *ch = (php_curl *)ctx;
@@ -1576,8 +1568,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
}
/* }}} */
-/* {{{ curl_write_header
- */
+/* {{{ curl_write_header */
static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx)
{
php_curl *ch = (php_curl *) ctx;
@@ -1657,16 +1648,14 @@ static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, v
}
/* }}} */
-/* {{{ curl_free_string
- */
+/* {{{ curl_free_string */
static void curl_free_string(void **string)
{
efree((char *)*string);
}
/* }}} */
-/* {{{ curl_free_post
- */
+/* {{{ curl_free_post */
static void curl_free_post(void **post)
{
#if LIBCURL_VERSION_NUM >= 0x073800 /* 7.56.0 */
@@ -1682,8 +1671,7 @@ struct mime_data_cb_arg {
php_stream *stream;
};
-/* {{{ curl_free_cb_arg
- */
+/* {{{ curl_free_cb_arg */
static void curl_free_cb_arg(void **cb_arg_p)
{
struct mime_data_cb_arg *cb_arg = (struct mime_data_cb_arg *) *cb_arg_p;
@@ -1694,16 +1682,14 @@ static void curl_free_cb_arg(void **cb_arg_p)
}
/* }}} */
-/* {{{ curl_free_slist
- */
+/* {{{ curl_free_slist */
static void curl_free_slist(zval *el)
{
curl_slist_free_all(((struct curl_slist *)Z_PTR_P(el)));
}
/* }}} */
-/* {{{ proto array curl_version()
- Return cURL version information. */
+/* {{{ Return cURL version information. */
PHP_FUNCTION(curl_version)
{
curl_version_info_data *d;
@@ -1795,8 +1781,7 @@ void init_curl_handle(php_curl *ch)
/* }}} */
-/* {{{ create_certinfo
- */
+/* {{{ create_certinfo */
static void create_certinfo(struct curl_certinfo *ci, zval *listcode)
{
int i;
@@ -1864,8 +1849,7 @@ static void _php_curl_set_default_options(php_curl *ch)
}
/* }}} */
-/* {{{ proto CurlHandle curl_init([string url])
- Initialize a cURL session */
+/* {{{ Initialize a cURL session */
PHP_FUNCTION(curl_init)
{
php_curl *ch;
@@ -2183,8 +2167,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
}
/* }}} */
-/* {{{ proto CurlHandle curl_copy_handle(CurlHandle ch)
- Copy a cURL handle along with all of it's preferences */
+/* {{{ Copy a cURL handle along with all of it's preferences */
PHP_FUNCTION(curl_copy_handle)
{
php_curl *ch;
@@ -2878,8 +2861,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
}
/* }}} */
-/* {{{ proto bool curl_setopt(CurlHandle ch, int option, mixed value)
- Set an option for a cURL transfer */
+/* {{{ Set an option for a cURL transfer */
PHP_FUNCTION(curl_setopt)
{
zval *zid, *zvalue;
@@ -2907,8 +2889,7 @@ PHP_FUNCTION(curl_setopt)
}
/* }}} */
-/* {{{ proto bool curl_setopt_array(CurlHandle ch, array options)
- Set an array of option for a cURL transfer */
+/* {{{ Set an array of option for a cURL transfer */
PHP_FUNCTION(curl_setopt_array)
{
zval *zid, *arr, *entry;
@@ -2954,8 +2935,7 @@ void _php_curl_cleanup_handle(php_curl *ch)
}
/* }}} */
-/* {{{ proto bool curl_exec(CurlHandle ch)
- Perform a cURL session */
+/* {{{ Perform a cURL session */
PHP_FUNCTION(curl_exec)
{
CURLcode error;
@@ -3009,8 +2989,7 @@ PHP_FUNCTION(curl_exec)
}
/* }}} */
-/* {{{ proto mixed curl_getinfo(CurlHandle ch [, int option])
- Get information regarding a specific transfer */
+/* {{{ Get information regarding a specific transfer */
PHP_FUNCTION(curl_getinfo)
{
zval *zid;
@@ -3263,8 +3242,7 @@ PHP_FUNCTION(curl_getinfo)
}
/* }}} */
-/* {{{ proto string curl_error(CurlHandle ch)
- Return a string contain the last error for the current session */
+/* {{{ Return a string contain the last error for the current session */
PHP_FUNCTION(curl_error)
{
zval *zid;
@@ -3285,8 +3263,7 @@ PHP_FUNCTION(curl_error)
}
/* }}} */
-/* {{{ proto int curl_errno(CurlHandle ch)
- Return an integer containing the last error number */
+/* {{{ Return an integer containing the last error number */
PHP_FUNCTION(curl_errno)
{
zval *zid;
@@ -3302,8 +3279,7 @@ PHP_FUNCTION(curl_errno)
}
/* }}} */
-/* {{{ proto void curl_close(CurlHandle ch)
- Close a cURL session */
+/* {{{ Close a cURL session */
PHP_FUNCTION(curl_close)
{
zval *zid;
@@ -3395,8 +3371,7 @@ static void curl_free_obj(zend_object *object)
}
/* }}} */
-/* {{{ proto bool curl_strerror(int code)
- return string describing error code */
+/* {{{ return string describing error code */
PHP_FUNCTION(curl_strerror)
{
zend_long code;
@@ -3461,8 +3436,7 @@ static void _php_curl_reset_handlers(php_curl *ch)
}
/* }}} */
-/* {{{ proto void curl_reset(CurlHandle ch)
- Reset all options of a libcurl session handle */
+/* {{{ Reset all options of a libcurl session handle */
PHP_FUNCTION(curl_reset)
{
zval *zid;
@@ -3485,8 +3459,7 @@ PHP_FUNCTION(curl_reset)
}
/* }}} */
-/* {{{ proto void curl_escape(CurlHandle ch, string str)
- URL encodes the given string */
+/* {{{ URL encodes the given string */
PHP_FUNCTION(curl_escape)
{
zend_string *str;
@@ -3514,8 +3487,7 @@ PHP_FUNCTION(curl_escape)
}
/* }}} */
-/* {{{ proto void curl_unescape(CurlHandle ch, string str)
- URL decodes the given string */
+/* {{{ URL decodes the given string */
PHP_FUNCTION(curl_unescape)
{
char *out = NULL;
@@ -3544,8 +3516,7 @@ PHP_FUNCTION(curl_unescape)
}
/* }}} */
-/* {{{ proto void curl_pause(CurlHandle ch, int bitmask)
- pause and unpause a connection */
+/* {{{ pause and unpause a connection */
PHP_FUNCTION(curl_pause)
{
zend_long bitmask;
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index ee3c034523..e1fed9f2ee 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -58,8 +58,7 @@ static inline php_curlm *curl_multi_from_obj(zend_object *obj) {
#define Z_CURL_MULTI_P(zv) curl_multi_from_obj(Z_OBJ_P(zv))
-/* {{{ proto CurlMultiHandle curl_multi_init(void)
- Returns a new cURL multi handle */
+/* {{{ Returns a new cURL multi handle */
PHP_FUNCTION(curl_multi_init)
{
php_curlm *mh;
@@ -75,8 +74,7 @@ PHP_FUNCTION(curl_multi_init)
}
/* }}} */
-/* {{{ proto int curl_multi_add_handle(CurlMultiHandle mh, Curl ch)
- Add a normal cURL handle to a cURL multi handle */
+/* {{{ Add a normal cURL handle to a cURL multi handle */
PHP_FUNCTION(curl_multi_add_handle)
{
zval *z_mh;
@@ -144,8 +142,7 @@ static zval *_php_curl_multi_find_easy_handle(php_curlm *mh, CURL *easy) /* {{{
}
/* }}} */
-/* {{{ proto int curl_multi_remove_handle(CurlMultiHandle mh, Curl ch)
- Remove a multi handle from a set of cURL handles */
+/* {{{ Remove a multi handle from a set of cURL handles */
PHP_FUNCTION(curl_multi_remove_handle)
{
zval *z_mh;
@@ -171,8 +168,7 @@ PHP_FUNCTION(curl_multi_remove_handle)
}
/* }}} */
-/* {{{ proto int curl_multi_select(CurlMultiHandle mh[, double timeout])
- Get all the sockets associated with the cURL extension, which can then be "selected" */
+/* {{{ Get all the sockets associated with the cURL extension, which can then be "selected" */
PHP_FUNCTION(curl_multi_select)
{
zval *z_mh;
@@ -199,8 +195,7 @@ PHP_FUNCTION(curl_multi_select)
}
/* }}} */
-/* {{{ proto int curl_multi_exec(CurlMultiHandle mh, int &still_running)
- Run the sub-connections of the current cURL handle */
+/* {{{ Run the sub-connections of the current cURL handle */
PHP_FUNCTION(curl_multi_exec)
{
zval *z_mh;
@@ -238,8 +233,7 @@ PHP_FUNCTION(curl_multi_exec)
}
/* }}} */
-/* {{{ proto string curl_multi_getcontent(CurlHandle ch)
- Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set */
+/* {{{ Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set */
PHP_FUNCTION(curl_multi_getcontent)
{
zval *z_ch;
@@ -263,8 +257,7 @@ PHP_FUNCTION(curl_multi_getcontent)
}
/* }}} */
-/* {{{ proto array curl_multi_info_read(CurlMultiHandle mh [, int &msgs_in_queue])
- Get information about the current transfers */
+/* {{{ Get information about the current transfers */
PHP_FUNCTION(curl_multi_info_read)
{
zval *z_mh;
@@ -310,8 +303,7 @@ PHP_FUNCTION(curl_multi_info_read)
}
/* }}} */
-/* {{{ proto void curl_multi_close(CurlMultiHandle mh)
- Close a set of cURL handles */
+/* {{{ Close a set of cURL handles */
PHP_FUNCTION(curl_multi_close)
{
php_curlm *mh;
@@ -336,8 +328,7 @@ PHP_FUNCTION(curl_multi_close)
}
/* }}} */
-/* {{{ proto int curl_multi_errno(CurlMultiHandle mh)
- Return an integer containing the last multi curl error number */
+/* {{{ Return an integer containing the last multi curl error number */
PHP_FUNCTION(curl_multi_errno)
{
zval *z_mh;
@@ -353,8 +344,7 @@ PHP_FUNCTION(curl_multi_errno)
}
/* }}} */
-/* {{{ proto bool curl_multi_strerror(int code)
- return string describing error code */
+/* {{{ return string describing error code */
PHP_FUNCTION(curl_multi_strerror)
{
zend_long code;
@@ -498,8 +488,7 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue,
}
/* }}} */
-/* {{{ proto int curl_multi_setopt(CurlMultiHandle mh, int option, mixed value)
- Set an option for the curl multi handle */
+/* {{{ Set an option for the curl multi handle */
PHP_FUNCTION(curl_multi_setopt)
{
zval *z_mh, *zvalue;
diff --git a/ext/curl/share.c b/ext/curl/share.c
index aa6b27f458..9cabed2e91 100644
--- a/ext/curl/share.c
+++ b/ext/curl/share.c
@@ -31,8 +31,7 @@
#define SAVE_CURLSH_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
-/* {{{ proto CurlShareHandle curl_share_init()
- Initialize a share curl handle */
+/* {{{ Initialize a share curl handle */
PHP_FUNCTION(curl_share_init)
{
php_curlsh *sh;
@@ -46,8 +45,7 @@ PHP_FUNCTION(curl_share_init)
}
/* }}} */
-/* {{{ proto void curl_share_close(CurlShareHandle sh)
- Close a set of cURL handles */
+/* {{{ Close a set of cURL handles */
PHP_FUNCTION(curl_share_close)
{
zval *z_sh;
@@ -80,8 +78,7 @@ static int _php_curl_share_setopt(php_curlsh *sh, zend_long option, zval *zvalue
}
/* }}} */
-/* {{{ proto bool curl_share_setopt(CurlShareHandle sh, int option, mixed value)
- Set an option for a cURL transfer */
+/* {{{ Set an option for a cURL transfer */
PHP_FUNCTION(curl_share_setopt)
{
zval *z_sh, *zvalue;
@@ -104,8 +101,7 @@ PHP_FUNCTION(curl_share_setopt)
}
/* }}} */
-/* {{{ proto int curl_share_errno(CurlShareHandle sh)
- Return an integer containing the last share curl error number */
+/* {{{ Return an integer containing the last share curl error number */
PHP_FUNCTION(curl_share_errno)
{
zval *z_sh;
@@ -122,8 +118,7 @@ PHP_FUNCTION(curl_share_errno)
/* }}} */
-/* {{{ proto bool curl_share_strerror(int code)
- return string describing error code */
+/* {{{ return string describing error code */
PHP_FUNCTION(curl_share_strerror)
{
zend_long code;