MCPcopy Create free account
hub / github.com/Kitware/VTK / CheckSizeHint

Method CheckSizeHint

Wrapping/PythonCore/vtkPythonArgs.cxx:1624–1635  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Check if 'm' equals 'n', and report an error for arg i if not.

Source from the content-addressed store, hash-verified

1622//------------------------------------------------------------------------------
1623// Check if 'm' equals 'n', and report an error for arg i if not.
1624bool vtkPythonArgs::CheckSizeHint(int i, size_t m, size_t n)
1625{
1626 if (this->M + i < this->N)
1627 {
1628 if (m != n)
1629 {
1630 PyObject* o = PyTuple_GetItem(this->Args, this->M + i);
1631 return vtkPythonSequenceError(o, n, m);
1632 }
1633 }
1634 return true;
1635}
1636
1637//------------------------------------------------------------------------------
1638// Use stack space for small arrays, heap for large arrays.

Callers

nothing calls this directly

Calls 1

vtkPythonSequenceErrorFunction · 0.85

Tested by

no test coverage detected