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

@ -56,8 +56,10 @@ extern DL_IMPORT(PyTypeObject) PyString_Type;
extern DL_IMPORT(PyObject *) PyString_FromStringAndSize(const char *, int);
extern DL_IMPORT(PyObject *) PyString_FromString(const char *);
extern DL_IMPORT(PyObject *) PyString_FromFormatV(const char*, va_list);
extern DL_IMPORT(PyObject *) PyString_FromFormat(const char*, ...);
extern DL_IMPORT(PyObject *) PyString_FromFormatV(const char*, va_list)
__attribute__((format(printf, 1, 0)));
extern DL_IMPORT(PyObject *) PyString_FromFormat(const char*, ...)
__attribute__((format(printf, 1, 2)));
extern DL_IMPORT(int) PyString_Size(PyObject *);
extern DL_IMPORT(char *) PyString_AsString(PyObject *);
extern DL_IMPORT(void) PyString_Concat(PyObject **, PyObject *);