diff Include/stringobject.h @ 20626:3d299b156511 legacy-trunk

Add function attributes that allow GCC to check the arguments of printf-like functions.
author Neil Schemenauer <nascheme@enme.ucalgary.ca>
date Tue, 23 Oct 2001 02:21:22 +0000
parents 662e22f99639
children f3a416b178c4
line wrap: on
line diff
--- a/Include/stringobject.h	Tue Oct 23 02:20:37 2001 +0000
+++ b/Include/stringobject.h	Tue Oct 23 02:21:22 2001 +0000
@@ -56,8 +56,10 @@
 
 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 *);