gh-107689: add docstrings to abstract classes by kiblik1 · Pull Request #108882 · python/cpython
PyDoc_STRVAR(cdata_doc, "This non-public class is the common base class of all ctypes data types. Among other things, all ctypes type\n" "instances contain a memory block that hold C compatible data; the address of the memory block is returned\n" "by the addressof() helper function. Another instance variable is exposed as _objects; this contains\n" "other Python objects that need to be kept alive in case the memory block contains pointers." );
PyTypeObject PyCData_Type = { PyVarObject_HEAD_INIT(NULL, 0) "_ctypes._CData",
PyDoc_STRVAR(simple_cdata_doc, "This non-public class is the base class of all fundamental ctypes data types.\n" "It contains the common attributes of the fundamentalctypes data types.\n" "_SimpleCData is a subclass of _CData, so it inherits their methods and attributes." );
static PyTypeObject Simple_Type = { PyVarObject_HEAD_INIT(NULL, 0) "_ctypes._SimpleCData",
PyDoc_STRVAR(cpointer_doc, "Private, abstract base class for pointers.\n" "\n" "Concrete pointer types are created by calling POINTER() with the type that will be pointed to; this is done\n" "automatically by pointer().\n" "\n" "If a pointer points to an array, its elements can be read and written using standard subscript and slice ac-\n" "cesses. Pointer objects have no size, so len() will raise TypeError. Negative subscripts will read from the\n" "memory before the pointer (as in C), and out-of-range subscripts will probably crash with an access violation\n" "(if you’re lucky)." );
PyTypeObject PyCPointer_Type = { PyVarObject_HEAD_INIT(NULL, 0) "_ctypes._Pointer",