commit 8b14e06b49afac7248567a1a726f8acf43ecebd0 Author: David Malcolm dmalcolm@redhat.com Date: Fri Sep 2 16:49:39 2011 -0400
cpychecker: implement PyString_FromFormat
libcpychecker/refcounts.py | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) --- diff --git a/libcpychecker/refcounts.py b/libcpychecker/refcounts.py index 37371f7..6a36ab3 100644 --- a/libcpychecker/refcounts.py +++ b/libcpychecker/refcounts.py @@ -1163,6 +1163,19 @@ class MyState(State): ######################################################################## # PyString_* ######################################################################## + def impl_PyString_FromFormat(self, stmt): + # Declared in stringobject.h as: + # PyAPI_FUNC(PyObject *) PyString_FromFormat(const char*, ...) + # Py_GCC_ATTRIBUTE((format(printf, 1, 2))); + # Returns a new reference + # http://docs.python.org/c-api/string.html#PyString_FromFormat + # + # (We do not yet check that the format string matches the types of the + # varargs) + newobj, t_success, t_failure = self.impl_object_ctor(stmt, + 'PyStringObject', 'PyString_Type') + return [t_success, t_failure] + def impl_PyString_FromString(self, stmt): # Declared in stringobject.h as: # PyAPI_FUNC(PyObject *) PyString_FromString(const char *);
gcc-python-plugin-commits@lists.stg.fedorahosted.org