summaryrefslogtreecommitdiffstats
path: root/Include/stringobject.h
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-10-23 02:21:22 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-10-23 02:21:22 (GMT)
commit90b689076a6dcb55dcac6c5efbc9e4aa793e6c72 (patch)
tree0d673dc58dec42d1fde0a7d2de01af8f3c3ac100 /Include/stringobject.h
parent156910851e31d4e7f8d1441a3b05a44b31349adf (diff)
downloadcpython-90b689076a6dcb55dcac6c5efbc9e4aa793e6c72.zip
cpython-90b689076a6dcb55dcac6c5efbc9e4aa793e6c72.tar.gz
cpython-90b689076a6dcb55dcac6c5efbc9e4aa793e6c72.tar.bz2
Add function attributes that allow GCC to check the arguments of printf-like
functions.
Diffstat (limited to 'Include/stringobject.h')
-rw-r--r--Include/stringobject.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Include/stringobject.h b/Include/stringobject.h
index 052eacf..a5d97fa 100644
--- a/Include/stringobject.h
+++ b/Include/stringobject.h
@@ -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 *);