#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, ...);
+extern void _http_error_ex(long type, long code, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
#define http_exit(s, h) http_exit_ex((s), (h), 1)
#define http_exit_ex(s, h, f) _http_exit_ex((s), (h), (f) TSRMLS_CC)
#define phpstr_appends(b, a) phpstr_append((b), (a), sizeof(a)-1)
#define phpstr_appendl(b, a) phpstr_append((b), (a), strlen(a))
PHPSTR_API size_t phpstr_append(phpstr *buf, const char *append, size_t append_len);
-PHPSTR_API size_t phpstr_appendf(phpstr *buf, const char *format, ...);
+PHPSTR_API size_t phpstr_appendf(phpstr *buf, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
/* insert data at a specific position of the phpstr */
#define phpstr_inserts(b, i, o) phpstr_insert((b), (i), sizeof(i)-1, (o))
#define phpstr_insertl(b, i, o) phpstr_insert((b), (i), strlen(i), (o))
PHPSTR_API size_t phpstr_insert(phpstr *buf, const char *insert, size_t insert_len, size_t offset);
-PHPSTR_API size_t phpstr_insertf(phpstr *buf, size_t offset, const char *format, ...);
+PHPSTR_API size_t phpstr_insertf(phpstr *buf, size_t offset, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
/* prepend data */
#define phpstr_prepends(b, p) phpstr_prepend((b), (p), sizeof(p)-1)
#define phpstr_prependl(b, p) phpstr_prepend((b), (p), strlen(p))
PHPSTR_API size_t phpstr_prepend(phpstr *buf, const char *prepend, size_t prepend_len);
-PHPSTR_API size_t phpstr_prependf(phpstr *buf, const char *format, ...);
+PHPSTR_API size_t phpstr_prependf(phpstr *buf, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
/* get a zero-terminated string */
PHPSTR_API char *phpstr_data(const phpstr *buf, char **into, size_t *len);