[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-python-plugin-commits
Subject: [gcc-python-plugin] cpychecker: implement PyTraceBack_Here
From: dmalcolm () fedoraproject ! org (dmalcolm)
Date: 2012-02-17 2:31:54
Message-ID: 20120217023154.8F955144D () lists ! fedorahosted ! org
[Download RAW message or body]
commit 5a645377cbca7787f2a1b5235bd86effd8397c61
Author: David Malcolm <dmalcolm at redhat.com>
Date: Thu Feb 16 21:30:00 2012 -0500
cpychecker: implement PyTraceBack_Here
libcpychecker/refcounts.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/libcpychecker/refcounts.py b/libcpychecker/refcounts.py
index 426686c..d4bc9a6 100644
--- a/libcpychecker/refcounts.py
+++ b/libcpychecker/refcounts.py
@@ -3028,6 +3028,20 @@ class CPython(Facet):
return [t_success, t_failure]
########################################################################
+ # PyTraceback_*
+ ########################################################################
+ def impl_PyTraceBack_Here(self, stmt, v_frame):
+ fnmeta = FnMeta(name='PyTraceBack_Here',
+ prototype='int PyTraceBack_Here(PyFrameObject *frame)',
+ declared_in='traceback.h',
+ defined_in='Python/traceback.c')
+ # (used in cython-generated code __Pyx_AddTraceback)
+ s_success = self.state.mkstate_concrete_return_of(stmt, 0)
+ s_failure = self.state.mkstate_concrete_return_of(stmt, -1)
+ return self.state.make_transitions_for_fncall(stmt, fnmeta,
+ s_success, s_failure)
+
+ ########################################################################
# PyTuple_*
########################################################################
def impl_PyTuple_GetItem(self, stmt, v_op, v_i):
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic