Add function attributes that allow GCC to check the arguments of printf-like

functions.
This commit is contained in:
Neil Schemenauer 2001-10-23 02:21:22 +00:00
parent 156910851e
commit 90b689076a
4 changed files with 18 additions and 9 deletions

View file

@ -25,8 +25,10 @@ extern "C" {
#include "pydebug.h"
DL_IMPORT(void) PySys_WriteStdout(const char *format, ...);
DL_IMPORT(void) PySys_WriteStderr(const char *format, ...);
DL_IMPORT(void) PySys_WriteStdout(const char *format, ...)
__attribute__((format(printf, 1, 2)));
DL_IMPORT(void) PySys_WriteStderr(const char *format, ...)
__attribute__((format(printf, 1, 2)));
#define addarc _Py_addarc
#define addbit _Py_addbit