MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / PP_Debug_Function

Function PP_Debug_Function

src/Base/PyTools.c:138–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136
137
138PyObject *
139PP_Debug_Function(PyObject *func, PyObject *args)
140{
141 int oops = 0, res = 0;
142 PyObject *presult = NULL;
143
144 /* expand tuple at front */
145 // it seems that some versions of python want just 2 arguments; in that
146 // case, remove trailing 1
147 oops = _PyTuple_Resize(&args, (1 + PyTuple_Size(args)));
148 oops |= PyTuple_SetItem(args, 0, func);
149 if (oops)
150 return NULL; /* "args = (funcobj,) + (arg,..)" */
151
152 res = PP_Run_Function( /* "pdb.runcall(funcobj, arg,..)" */
153 "pdb", "runcall", /* recursive run_function */
154 "O", &presult,
155 "O", args); /* args already is a tuple */
156 return (res != 0) ? NULL : presult; /* errors in run_function? */
157} /* presult not yet decref'd */
158
159
160int

Callers 3

PP_Run_MethodFunction · 0.85
PP_Run_FunctionFunction · 0.85
PP_Run_Known_CallableFunction · 0.85

Calls 1

PP_Run_FunctionFunction · 0.85

Tested by

no test coverage detected