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

Function vtkPythonGetUnsignedLongLongValue

Wrapping/PythonCore/vtkPythonArgs.cxx:68–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67template <class T>
68inline bool vtkPythonGetUnsignedLongLongValue(PyObject* o, T& a)
69{
70 VTK_PYTHON_FLOAT_CHECK();
71
72 // PyLong_AsUnsignedLongLong will fail if "o" is not a PyLong
73 if (PyLong_Check(o))
74 {
75 unsigned PY_LONG_LONG i = PyLong_AsUnsignedLongLong(o);
76 a = static_cast<T>(i);
77 return (i != static_cast<unsigned PY_LONG_LONG>(-1) || !PyErr_Occurred());
78 }
79
80 unsigned long l = PyLong_AsUnsignedLong(o);
81 a = static_cast<T>(l);
82 return (l != static_cast<unsigned long>(-1) || !PyErr_Occurred());
83}
84
85Py_ssize_t vtkPythonGetStringSize(PyObject* o)
86{

Callers 1

vtkPythonGetValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected