| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2006, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2007, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
}
/* function accepts no args */
-#define NO_ARGS \
- if (ZEND_NUM_ARGS()) { \
- zend_error(E_NOTICE, "Wrong parameter count for %s()", get_active_function_name(TSRMLS_C)); \
- }
+#define NO_ARGS zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "");
/* CR LF */
#define HTTP_CRLF "\r\n"
#define HTTP_URL_ARGSEP "&"
/* send buffer size */
-#define HTTP_SENDBUF_SIZE 40960
+#define HTTP_SENDBUF_SIZE 8000 /*40960*/
/* CURL buffer size */
#define HTTP_CURLBUF_SIZE 16384
# define ACC_PROP_PUBLIC(flags) (flags & ZEND_ACC_PUBLIC)
# define ACC_PROP(ce, flags) (ACC_PROP_PUBLIC(flags) || ACC_PROP_PRIVATE(ce, flags) || ACC_PROP_PROTECTED(ce, flags))
-# define SET_EH_THROW() SET_EH_THROW_EX(zend_exception_get_default())
# define SET_EH_THROW_HTTP() SET_EH_THROW_EX(http_exception_get_default())
# define SET_EH_THROW_EX(ex) php_set_error_handling(EH_THROW, ex TSRMLS_CC)
# define SET_EH_NORMAL() php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC)
#endif /* HTTP_HAVE_CURL */
-#ifndef TSRMLS_FETCH_FROM_CTX
-# ifdef ZTS
-# define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx
-# else
-# define TSRMLS_FETCH_FROM_CTX(ctx)
-# endif
-#endif
-
-#ifndef TSRMLS_SET_CTX
-# ifdef ZTS
-# define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_ls
-# else
-# define TSRMLS_SET_CTX(ctx)
-# endif
-#endif
-
-#ifndef ZVAL_ZVAL
-#define ZVAL_ZVAL(z, zv, copy, dtor) { \
- int is_ref, refcount; \
- is_ref = (z)->is_ref; \
- refcount = (z)->refcount; \
- *(z) = *(zv); \
- if (copy) { \
- zval_copy_ctor(z); \
- } \
- if (dtor) { \
- if (!copy) { \
- ZVAL_NULL(zv); \
- } \
- zval_ptr_dtor(&zv); \
- } \
- (z)->is_ref = is_ref; \
- (z)->refcount = refcount; \
- }
+#ifndef HAVE_CURL_SHARE_STRERROR
+# define curl_share_strerror(dummy) "unknown error"
#endif
-#ifndef RETVAL_ZVAL
-#define RETVAL_ZVAL(zv, copy, dtor) ZVAL_ZVAL(return_value, zv, copy, dtor)
+#ifndef HAVE_CURL_EASY_STRERROR
+# define curl_easy_strerror(dummy) "unknown error"
#endif
-#ifndef RETURN_ZVAL
-#define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; }
+#ifndef HAVE_CURL_MULTI_STRERROR
+# define curl_multi_strerror(dummy) "unknown error"
#endif
#define PHP_MINIT_CALL(func) PHP_MINIT(func)(INIT_FUNC_ARGS_PASSTHRU)