- added custom error function which is able to throw exceptions
[m6w6/ext-http] / php_http_api.h
index b7327b44807124805d716a4848a637dbf8ef78c1..d08a2a9bb35807c1bafb8f103d0b7e88849feab9 100644 (file)
 
 #include "php_http_std_defs.h"
 
-char *pretty_key(char *key, size_t key_len, zend_bool uctitle, zend_bool xhyphen);
+#define pretty_key(key, key_len, uctitle, xhyphen) _http_pretty_key(key, key_len, uctitle, xhyphen)
+extern char *_http_pretty_key(char *key, size_t key_len, zend_bool uctitle, zend_bool xhyphen);
+
+#define http_error(type, code, string) _http_error_ex(type, code, "%s", string)
+#define http_error_ex _http_error_ex
+extern void _http_error_ex(long type, long code, const char *format, ...);
 
 #define HTTP_GSC(var, name, ret)  HTTP_GSP(var, name, return ret)
 #define HTTP_GSP(var, name, ret) \