|
1 | 1 | # cython: language_level=3str |
2 | 2 | cimport cython |
3 | 3 | from cpython.pystate cimport Py_tracefunc |
4 | | -from cpython.pystate cimport PyFrameObject |
5 | 4 | from cpython.ref cimport PyObject |
6 | 5 |
|
7 | | -ctypedef extern FrameType |
8 | | - |
9 | | -cdef extern from "vendor/_compat.h": |
10 | | - """ |
11 | | - static inline PyCodeObject* Hunter_PyFrame_GetCode(PyObject* frame) { |
12 | | - return PyFrame_GetCode((PyFrameObject*) frame); |
13 | | - } |
14 | | - static inline int Hunter_PyFrame_GetLasti(PyObject* frame) { |
15 | | - return PyFrame_GetLasti((PyFrameObject*) frame); |
16 | | - } |
17 | | - static inline int Hunter_PyFrame_GetLineNumber(PyObject* frame) { |
18 | | - return PyFrame_GetLineNumber((PyFrameObject*) frame); |
19 | | - } |
20 | | - static inline PyObject* Hunter_PyFrame_GetGlobals(PyObject* frame) { |
21 | | - return PyFrame_GetGlobals((PyFrameObject*) frame); |
22 | | - } |
23 | | - static inline PyObject* Hunter_PyFrame_GetLocals(PyObject* frame) { |
24 | | - return PyFrame_GetLocals((PyFrameObject*) frame); |
25 | | - } |
26 | | - """ |
27 | | - object PyCode_GetCode(CodeType) |
28 | | - object PyCode_GetVarnames(CodeType) |
29 | | - CodeType Hunter_PyFrame_GetCode(FrameType frame) |
30 | | - int Hunter_PyFrame_GetLasti(FrameType frame) |
31 | | - int Hunter_PyFrame_GetLineNumber(FrameType frame) |
32 | | - object Hunter_PyFrame_GetGlobals(FrameType frame) |
33 | | - object Hunter_PyFrame_GetLocals(FrameType frame) |
34 | 6 |
|
| 7 | +ctypedef extern FrameType |
35 | 8 |
|
36 | 9 | cdef extern from *: |
37 | 10 | void PyEval_SetTrace(Py_tracefunc, PyObject*) |
|
0 commit comments