diff options
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/bytearray.rst | 6 | ||||
-rw-r--r-- | Doc/c-api/type.rst | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Doc/c-api/bytearray.rst b/Doc/c-api/bytearray.rst index 1b0f377..b90b3ff 100644 --- a/Doc/c-api/bytearray.rst +++ b/Doc/c-api/bytearray.rst @@ -10,7 +10,7 @@ Byte Array Objects .. ctype:: PyByteArrayObject - This subtype of :ctype:`PyObject` represents a Python string object. + This subtype of :ctype:`PyObject` represents a Python bytearray object. .. cvar:: PyTypeObject PyByteArray_Type @@ -36,10 +36,12 @@ Byte Array Objects Return a new bytearray object from any object, *o*, that implements the buffer protocol. + .. XXX expand about the buffer protocol, at least somewhere + .. cfunction:: PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len) - Create a new bytearray object from *string* and it's length, *len*. On + Create a new bytearray object from *string* and its length, *len*. On failure, *NULL* is returned. diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index bc0eeef..07f82c9 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -35,7 +35,14 @@ Type Objects .. cfunction:: unsigned int PyType_ClearCache(void) - Clears the internal lookup cache. Return the current version tag. + Clear the internal lookup cache. Return the current version tag. + + +.. cfunction:: void PyType_Modified(PyTypeObject *type) + + Invalidate the internal lookup cache for the type and all of its + subtypes. This function must be called after any manual + modification of the attributes or base classes of the type. .. cfunction:: int PyType_HasFeature(PyObject *o, int feature) |