diff options
author | Sterling Hughes <sterling@php.net> | 2001-04-30 14:36:19 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2001-04-30 14:36:19 +0000 |
commit | ea2cf1856f610537e13be39da629064c06b45707 (patch) | |
tree | 41a849d5f73b648cc1c226bdfb64362231b9dea3 /ext/curl/php_curl.h | |
parent | 0a121f855ca679e188fe6c8146e5455b63eaf20c (diff) | |
download | php-git-ea2cf1856f610537e13be39da629064c06b45707.tar.gz |
# Ok, big ass change list. Most of the changes are NEW's worthy, so
# I'll enter them directly there, not here.... The non-newsworthy code
# is:
Added REGISTER_CURL_CONSTANT() a wrapper around REGISTER_LONG_CONSTANT()
Re-vamp the internal php_curl structure.
Properly free allocated slist's and HttpPost structures
many whitespace changes
speed improvements (in the post handling and slist area's)
# Furthermore, as a side note, while the code I'm committing is correct,
# no one will be able to compile it yet and test it, as it requires a
# patched version of curl (if you really want to try it out and can't
# wait a day or two, send me a private mail)
Diffstat (limited to 'ext/curl/php_curl.h')
-rw-r--r-- | ext/curl/php_curl.h | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 58ee10aa2b..326318e75a 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -21,6 +21,9 @@ #ifndef _PHP_CURL_H #define _PHP_CURL_H +#include "php.h" +#include "ext/standard/php_smart_str.h" + #ifdef COMPILE_DL_CURL #undef HAVE_CURL #define HAVE_CURL 1 @@ -30,6 +33,7 @@ #include <curl/curl.h> + extern zend_module_entry curl_module_entry; #define curl_module_ptr &curl_module_entry @@ -42,22 +46,47 @@ PHP_FUNCTION(curl_version); PHP_FUNCTION(curl_init); PHP_FUNCTION(curl_setopt); PHP_FUNCTION(curl_exec); -#if LIBCURL_VERSION_NUM >= 0x070401 PHP_FUNCTION(curl_getinfo); -#endif PHP_FUNCTION(curl_error); PHP_FUNCTION(curl_errno); PHP_FUNCTION(curl_close); typedef struct { - int return_transfer; - int output_file; - int php_stdout; - int cerrno; - char error[CURL_ERROR_SIZE+1]; - FILE *tmp_fp; - CURL *cp; - zend_llist to_free; + zval *func; + smart_str buf; + int method; +} php_curl_write; + +typedef struct { + zval *func; + long fd; + int method; +} php_curl_read; + +typedef struct { + zval *write_header; + zval *passwd; +} php_curl_handlers; + +struct _php_curl_error { + char str[CURL_ERROR_SIZE + 1]; + int no; +}; + +struct _php_curl_free { + zend_llist str; + zend_llist post; + zend_llist slist; +}; + +typedef struct { + CURL *cp; + php_curl_write *write; + php_curl_read *read; + php_curl_handlers *handlers; + struct _php_curl_error err; + struct _php_curl_free to_free; + long id; } php_curl; |