Commit d2444015 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

docs: make `Return value: New reference.` explicit.

Make it more explicit in docs that a few methods in vtkPythonUtil and
vtkPythonAlgorithm return new reference PyObject (similar to how Python
docs document such functions).
parent 447b2067
......@@ -96,6 +96,7 @@ vtkPythonAlgorithm::~vtkPythonAlgorithm()
return failValue; \
/// Return value: New reference.
static PyObject* VTKToPython(vtkObjectBase* obj)
return vtkPythonUtil::GetObjectFromPointer(obj);
......@@ -96,6 +96,8 @@ public:
* if necessary. This function also passes ownership of the reference
* to the PyObject.
* Special behaviour: NULL is converted to Py_None.
* **Return value: New reference.**
static PyObject *GetObjectFromPointer(vtkObjectBase *ptr);
......@@ -122,6 +124,8 @@ public:
* Find the PyObject for a VTK object, return nullptr if not found.
* If the object is found, then it is returned as a new reference.
* Special behavior: If "ptr" is nullptr, then Py_None is returned.
* **Return value: New reference.**
static PyObject *FindObject(vtkObjectBase *ptr);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment