Objets tableau d'octets
***********************

PyByteArrayObject

   Ce sous-type de "PyObject" représente un objet "bytearray" Python.

PyTypeObject PyByteArray_Type

   Cette instance de "PyTypeObject" représente le type Python
   *bytearray*, c'est le même que "bytearray" côté Python.


Macros de vérification de type
==============================

int PyByteArray_Check(PyObject *o)

   Return true if the object *o* is a bytearray object or an instance
   of a subtype of the bytearray type.  This function always succeeds.

int PyByteArray_CheckExact(PyObject *o)

   Return true if the object *o* is a bytearray object, but not an
   instance of a subtype of the bytearray type.  This function always
   succeeds.


Fonctions directes sur l'API
============================

PyObject* PyByteArray_FromObject(PyObject *o)
    *Return value: New reference.*

   Renvoie un nouvel objet *bytearray* depuis n'importe quel objet,
   *o*, qui implémente le protocole buffer.

PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len)
    *Return value: New reference.*

   Create a new bytearray object from *string* and its length, *len*.
   On failure, "NULL" is returned.

PyObject* PyByteArray_Concat(PyObject *a, PyObject *b)
    *Return value: New reference.*

   Concatène les "bytearrays" *a* et *b* et renvoie un nouveau
   "bytearray" avec le résultat.

Py_ssize_t PyByteArray_Size(PyObject *bytearray)

   Return the size of *bytearray* after checking for a "NULL" pointer.

char* PyByteArray_AsString(PyObject *bytearray)

   Return the contents of *bytearray* as a char array after checking
   for a "NULL" pointer.  The returned array always has an extra null
   byte appended.

int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len)

   Redimensionne le tampon interne de *bytearray* à la taille *len*.


Macros
======

Ces macros sont taillées pour la vitesse d'exécution et ne vérifient
pas les pointeurs.

char* PyByteArray_AS_STRING(PyObject *bytearray)

   Version macro de "PyByteArray_AsString()".

Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray)

   Version macro de "PyByteArray_Size()".
