85 Py_XINCREF(value.
mPtr);
86 if (PyTuple_SetItem(
mPtr, i, value.
mPtr) == -1) {
99 virtual bool accepts(PyObject *pyob)
const {
100 return pyob !=
nullptr && PyTuple_Check(pyob);
Root of the PyCXX exception hierarchy.
Definition exception.h:19
Reference-counted handle on any Python object, and the root of the PyCXX object hierarchy.
Definition object.h:42
void validate()
Enforce this type's accepts() test on the stored reference.
Definition object.h:237
PyObject * mPtr
Wrapped reference, null only between release() and the next assignment.
Definition object.h:191
SeqBase()
Definition seqbase.h:47
Tuple(const Object &ob)
Take another handle's reference as a tuple.
virtual void setItem(int i, const Object &value)
Write one element.
Definition tuple.h:84
Tuple(int nSize)
Create a tuple of a given length.
Tuple(PyObject *pyob)
Take a borrowed reference to an existing tuple.
Definition tuple.h:44
virtual bool accepts(PyObject *pyob) const
Accept only a tuple.
Definition tuple.h:99
Configuration header of the PyCXX binding layer.
C++ wrappers for the embedded Python interpreter's objects, types, and extension modules.
Definition attributeerror.h:7