[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-python-plugin-commits
Subject: [gcc-python-plugin] cpychecker: implement PyCode_New
From: dmalcolm () fedoraproject ! org (dmalcolm)
Date: 2012-02-17 2:31:16
Message-ID: 20120217023116.EA111142F () lists ! fedorahosted ! org
[Download RAW message or body]
commit d3ad62263f431b965b649339a4c1e4dddd4121dc
Author: David Malcolm <dmalcolm at redhat.com>
Date: Thu Feb 16 21:27:37 2012 -0500
cpychecker: implement PyCode_New
libcpychecker/refcounts.py | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/libcpychecker/refcounts.py b/libcpychecker/refcounts.py
index 1feeb22..0e5b3bf 100644
--- a/libcpychecker/refcounts.py
+++ b/libcpychecker/refcounts.py
@@ -1235,6 +1235,34 @@ class CPython(Facet):
t_failure]
########################################################################
+ # PyCode_*
+ ########################################################################
+ def impl_PyCode_New(self, stmt,
+ v_argcount, v_nlocals, v_stacksize, v_flags,
+ v_code, v_consts, v_names,
+ v_varnames, v_freevars, v_cellvars,
+ v_filename, v_name, v_firstlineno,
+ v_lnotab):
+ fnmeta = FnMeta(name='PyCode_New',
+ docurl='http://docs.python.org/c-api/code.html#PyCode_New',
+ declared_in='code.h',
+ prototype=('PyCodeObject *\n'
+ 'PyCode_New(int argcount, int nlocals, int \
stacksize, int flags,\n' + ' PyObject \
*code, PyObject *consts, PyObject *names,\n' + ' \
PyObject *varnames, PyObject *freevars, PyObject *cellvars,\n' + \
' PyObject *filename, PyObject *name, int firstlineno,\n' + \
' PyObject *lnotab);'), + \
defined_in='Objects/codeobject.c') + # (used by Cython-generated code in \
static void __Pyx_AddTraceback in + # each file)
+ # For now, ignore the effects on the input variables:
+ r_newobj, t_success, t_failure = self.object_ctor(stmt,
+ 'PyCodeObject',
+ 'PyCode_Type')
+ return [t_success, t_failure]
+
+
+ ########################################################################
# PyDict_*
########################################################################
def impl_PyDict_GetItem(self, stmt, v_mp, v_key):
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic