72 explicit String(
const char *pszText);
95 virtual bool accepts(PyObject *pyob)
const {
96 return pyob !=
nullptr && PyString_Check(pyob);
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Handle on a one-character Python string, and the element type of Py::String.
Definition char.h:22
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
virtual int max_size() const
SeqBase()
Definition seqbase.h:47
String(const HxStr &text)
Build a Python string from a game string.
String(const char *pszText)
Build a Python string from a C string.
virtual int capacity() const
Report the sentinel rather than the length.
Definition string.h:110
String(PyObject *pyob)
Take a borrowed reference to an existing string.
Definition string.h:43
virtual bool accepts(PyObject *pyob) const
Accept only a string.
Definition string.h:95
String(const Object &ob)
Take another handle's reference as a string.
Configuration header of the PyCXX binding layer.
C++ wrappers for the embedded Python interpreter's objects, types, and extension modules.
Definition attributeerror.h:7