Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdda1d19

Browse files
committed
GH-96803: Move PyUnstable_InterpreterFrame_GetCode() to Python.h
Declare the following 3 PyUnstable functions inInclude/cpython/pyframe.h rather than Include/cpython/frameobject.h,so they are now provided by the standard "#include <Python.h>".
1 parent032f480 commitdda1d19

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

‎Include/cpython/frameobject.h‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# error "this header file must not be included directly"
55
#endif
66

7-
struct_PyInterpreterFrame;
8-
97
/* Standard object interface */
108

119
PyAPI_FUNC(PyFrameObject*)PyFrame_New(PyThreadState*,PyCodeObject*,
@@ -29,18 +27,3 @@ PyAPI_FUNC(int) _PyFrame_IsEntryFrame(PyFrameObject *frame);
2927

3028
PyAPI_FUNC(int)PyFrame_FastToLocalsWithError(PyFrameObject*f);
3129
PyAPI_FUNC(void)PyFrame_FastToLocals(PyFrameObject*);
32-
33-
/* The following functions are for use by debuggers and other tools
34-
* implementing custom frame evaluators with PEP 523. */
35-
36-
/* Returns the code object of the frame (strong reference).
37-
* Does not raise an exception. */
38-
PyAPI_FUNC(PyObject*)PyUnstable_InterpreterFrame_GetCode(struct_PyInterpreterFrame*frame);
39-
40-
/* Returns a byte ofsset into the last executed instruction.
41-
* Does not raise an exception. */
42-
PyAPI_FUNC(int)PyUnstable_InterpreterFrame_GetLasti(struct_PyInterpreterFrame*frame);
43-
44-
/* Returns the currently executing line number, or -1 if there is no line number.
45-
* Does not raise an exception. */
46-
PyAPI_FUNC(int)PyUnstable_InterpreterFrame_GetLine(struct_PyInterpreterFrame*frame);

‎Include/cpython/pyframe.h‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,20 @@ PyAPI_FUNC(PyObject *) PyFrame_GetGenerator(PyFrameObject *frame);
1616
PyAPI_FUNC(int)PyFrame_GetLasti(PyFrameObject*frame);
1717
PyAPI_FUNC(PyObject*)PyFrame_GetVar(PyFrameObject*frame,PyObject*name);
1818
PyAPI_FUNC(PyObject*)PyFrame_GetVarString(PyFrameObject*frame,constchar*name);
19+
20+
/* The following functions are for use by debuggers and other tools
21+
* implementing custom frame evaluators with PEP 523. */
22+
23+
struct_PyInterpreterFrame;
24+
25+
/* Returns the code object of the frame (strong reference).
26+
* Does not raise an exception. */
27+
PyAPI_FUNC(PyObject*)PyUnstable_InterpreterFrame_GetCode(struct_PyInterpreterFrame*frame);
28+
29+
/* Returns a byte ofsset into the last executed instruction.
30+
* Does not raise an exception. */
31+
PyAPI_FUNC(int)PyUnstable_InterpreterFrame_GetLasti(struct_PyInterpreterFrame*frame);
32+
33+
/* Returns the currently executing line number, or -1 if there is no line number.
34+
* Does not raise an exception. */
35+
PyAPI_FUNC(int)PyUnstable_InterpreterFrame_GetLine(struct_PyInterpreterFrame*frame);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp