-----------------------------------------------------------------------------
| 66 | |
| 67 | //----------------------------------------------------------------------------- |
| 68 | void pqPythonDebugLeaksView::addObjectsToPython(const QList<vtkObjectBase*>& objects) |
| 69 | { |
| 70 | if (auto context = consoleContext(this->shell())) |
| 71 | { |
| 72 | vtkSmartPyObject pyListObj(PyList_New(objects.size())); |
| 73 | for (int i = 0; i < objects.size(); ++i) |
| 74 | { |
| 75 | PyObject* pyObj = vtkPythonUtil::GetObjectFromPointer(objects[i]); |
| 76 | PyList_SET_ITEM(pyListObj.GetPointer(), i, pyObj); |
| 77 | } |
| 78 | PyDict_SetItemString(context, "objs", pyListObj); |
| 79 | } |
| 80 | } |
no test coverage detected