MCPcopy Create free account
hub / github.com/ZeroIntensity/pointers.py / force_update_locals

Function force_update_locals

src/mod.c:212–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212static PyObject* force_update_locals(PyObject* self, PyObject* args) {
213 PyFrameObject* f;
214 PyObject* key;
215 PyObject* value;
216
217 if (!PyArg_ParseTuple(
218 args,
219 "O!UO",
220 &PyFrame_Type,
221 &f,
222 &key,
223 &value
224 ))
225 return NULL;
226
227 PyObject* locals = GET_LOCALS(f);
228 if (PyDict_SetItem(
229 locals,
230 key,
231 value
232 ) < 0)
233 return NULL;
234
235 PyFrame_LocalsToFast(
236 f,
237 1
238 );
239 Py_RETURN_NONE;
240}
241
242static PyMethodDef methods[] = {
243 {"add_ref", add_ref, METH_VARARGS,

Callers 1

moveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected