-
-
Notifications
You must be signed in to change notification settings - Fork 36.7k
Expand file tree
/
Copy pathframeobject.c.h
More file actions
310 lines (228 loc) · 8.17 KB
/
Copy pathframeobject.c.h
File metadata and controls
310 lines (228 loc) · 8.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
/*[clinic input]
preserve
[clinic start generated code]*/
#include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION()
PyDoc_STRVAR(frame_locals__doc__,
"Return the mapping used by the frame to look up local variables.");
static PyObject *
frame_locals_get_impl(PyFrameObject *self);
static PyObject *
frame_locals_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_locals_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_lineno__doc__,
"Return the current line number in the frame.");
static PyObject *
frame_lineno_get_impl(PyFrameObject *self);
static PyObject *
frame_lineno_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_lineno_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_lasti__doc__,
"Return the index of the last attempted instruction in the frame.");
static PyObject *
frame_lasti_get_impl(PyFrameObject *self);
static PyObject *
frame_lasti_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_lasti_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_globals__doc__,
"Return the global variables in the frame.");
static PyObject *
frame_globals_get_impl(PyFrameObject *self);
static PyObject *
frame_globals_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_globals_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_builtins__doc__,
"Return the built-in variables in the frame.");
static PyObject *
frame_builtins_get_impl(PyFrameObject *self);
static PyObject *
frame_builtins_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_builtins_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_code__doc__,
"Return the code object being executed in this frame.");
static PyObject *
frame_code_get_impl(PyFrameObject *self);
static PyObject *
frame_code_get(PyObject *self, void *Py_UNUSED(context))
{
return frame_code_get_impl((PyFrameObject *)self);
}
static PyObject *
frame_back_get_impl(PyFrameObject *self);
static PyObject *
frame_back_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_back_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_trace_opcodes__doc__,
"Return True if opcode tracing is enabled, False otherwise.");
static PyObject *
frame_trace_opcodes_get_impl(PyFrameObject *self);
static PyObject *
frame_trace_opcodes_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_trace_opcodes_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
static int
frame_trace_opcodes_set_impl(PyFrameObject *self, PyObject *value);
static int
frame_trace_opcodes_set(PyObject *self, PyObject *arg, void *Py_UNUSED(context))
{
int return_value = -1;
PyObject *value;
if (arg == NULL) {
PyErr_Format(PyExc_AttributeError,
"attribute 'f_trace_opcodes' of '%.100s' objects cannot be deleted",
Py_TYPE(self)->tp_name);
return -1;
}
value = arg;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_trace_opcodes_set_impl((PyFrameObject *)self, value);
Py_END_CRITICAL_SECTION();
return return_value;
}
static int
frame_lineno_set_impl(PyFrameObject *self, PyObject *value);
static int
frame_lineno_set(PyObject *self, PyObject *arg, void *Py_UNUSED(context))
{
int return_value = -1;
PyObject *value;
if (arg == NULL) {
PyErr_Format(PyExc_AttributeError,
"attribute 'f_lineno' of '%.100s' objects cannot be deleted",
Py_TYPE(self)->tp_name);
return -1;
}
value = arg;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_lineno_set_impl((PyFrameObject *)self, value);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_trace__doc__,
"Return the trace function for this frame, or None if no trace function is set.");
static PyObject *
frame_trace_get_impl(PyFrameObject *self);
static PyObject *
frame_trace_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_trace_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
static int
frame_trace_set_impl(PyFrameObject *self, PyObject *value);
static int
frame_trace_set(PyObject *self, PyObject *arg, void *Py_UNUSED(context))
{
int return_value = -1;
PyObject *value = NULL;
if (arg != NULL) {
value = arg;
}
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_trace_set_impl((PyFrameObject *)self, value);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_generator__doc__,
"Return the generator or coroutine associated with this frame, or None.");
static PyObject *
frame_generator_get_impl(PyFrameObject *self);
static PyObject *
frame_generator_get(PyObject *self, void *Py_UNUSED(context))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_generator_get_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame_clear__doc__,
"clear($self, /)\n"
"--\n"
"\n"
"Clear all references held by the frame.");
#define FRAME_CLEAR_METHODDEF \
{"clear", (PyCFunction)frame_clear, METH_NOARGS, frame_clear__doc__},
static PyObject *
frame_clear_impl(PyFrameObject *self);
static PyObject *
frame_clear(PyObject *self, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame_clear_impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
PyDoc_STRVAR(frame___sizeof____doc__,
"__sizeof__($self, /)\n"
"--\n"
"\n"
"Return the size of the frame in memory, in bytes.");
#define FRAME___SIZEOF___METHODDEF \
{"__sizeof__", (PyCFunction)frame___sizeof__, METH_NOARGS, frame___sizeof____doc__},
static PyObject *
frame___sizeof___impl(PyFrameObject *self);
static PyObject *
frame___sizeof__(PyObject *self, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = frame___sizeof___impl((PyFrameObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}
#define FRAME_F_LOCALS_GETSETDEF {"f_locals", (getter)frame_locals_get, (setter)NULL, frame_locals__doc__},
#define FRAME_F_LINENO_GETSETDEF {"f_lineno", (getter)frame_lineno_get, (setter)frame_lineno_set, frame_lineno__doc__},
#define FRAME_F_LASTI_GETSETDEF {"f_lasti", (getter)frame_lasti_get, (setter)NULL, frame_lasti__doc__},
#define FRAME_F_GLOBALS_GETSETDEF {"f_globals", (getter)frame_globals_get, (setter)NULL, frame_globals__doc__},
#define FRAME_F_BUILTINS_GETSETDEF {"f_builtins", (getter)frame_builtins_get, (setter)NULL, frame_builtins__doc__},
#define FRAME_F_CODE_GETSETDEF {"f_code", (getter)frame_code_get, (setter)NULL, frame_code__doc__},
#define FRAME_F_BACK_GETSETDEF {"f_back", (getter)frame_back_get, (setter)NULL, NULL},
#define FRAME_F_TRACE_OPCODES_GETSETDEF {"f_trace_opcodes", (getter)frame_trace_opcodes_get, (setter)frame_trace_opcodes_set, frame_trace_opcodes__doc__},
#define FRAME_F_TRACE_GETSETDEF {"f_trace", (getter)frame_trace_get, (setter)frame_trace_set, frame_trace__doc__},
#define FRAME_F_GENERATOR_GETSETDEF {"f_generator", (getter)frame_generator_get, (setter)NULL, frame_generator__doc__},
/*[clinic end generated code: output=dfa59114b6dbce08 input=a9049054013a1b77]*/