commit d1e7998802d5bc88b0cc4e12630e11e9a4f0be43 Author: David Malcolm dmalcolm@redhat.com Date: Fri Sep 2 17:25:24 2011 -0400
cpychecker: implement PyType_Ready
libcpychecker/refcounts.py | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) --- diff --git a/libcpychecker/refcounts.py b/libcpychecker/refcounts.py index 2e561ad..0a8498b 100644 --- a/libcpychecker/refcounts.py +++ b/libcpychecker/refcounts.py @@ -1224,6 +1224,21 @@ class MyState(State): return [t_success, t_failure]
######################################################################## + # PyType_* + ######################################################################## + def impl_PyType_Ready(self, stmt): + # http://docs.python.org/dev/c-api/type.html#PyType_Ready + args = self.eval_stmt_args(stmt) + v_type = args[0] + s_success = self.mkstate_concrete_return_of(stmt, 0) + + s_failure = self.mkstate_concrete_return_of(stmt, -1) + s_failure.set_exception('PyExc_MemoryError') # various possible errors + + return self.make_transitions_for_fncall(stmt, s_success, s_failure) + + + ######################################################################## # (end of Python API implementations) ########################################################################
gcc-python-plugin-commits@lists.stg.fedorahosted.org