Back to index

python3.2  3.2.2
Classes | Defines | Functions | Variables
bytearrayobject.h File Reference
#include <stdarg.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PyByteArrayObject

Defines

#define PyByteArray_Check(self)   PyObject_TypeCheck(self, &PyByteArray_Type)
#define PyByteArray_CheckExact(self)   (Py_TYPE(self) == &PyByteArray_Type)
#define PyByteArray_AS_STRING(self)
#define PyByteArray_GET_SIZE(self)   (assert(PyByteArray_Check(self)),Py_SIZE(self))

Functions

 PyAPI_DATA (PyTypeObject) PyByteArray_Type
 PyAPI_FUNC (PyObject *) PyByteArray_FromObject(PyObject *)
 PyAPI_FUNC (Py_ssize_t) PyByteArray_Size(PyObject *)
 PyAPI_FUNC (char *) PyByteArray_AsString(PyObject *)
 PyAPI_DATA (char) _PyByteArray_empty_string[]

Variables

PyObject Py_ssize_t

Class Documentation

struct PyByteArrayObject

Definition at line 23 of file bytearrayobject.h.

Class Members
Py_ssize_t ob_alloc
char * ob_bytes
PyObject_VAR_HEAD int ob_exports

Define Documentation

#define PyByteArray_AS_STRING (   self)
Value:
(assert(PyByteArray_Check(self)), \
     Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_bytes : _PyByteArray_empty_string)

Definition at line 50 of file bytearrayobject.h.

#define PyByteArray_Check (   self)    PyObject_TypeCheck(self, &PyByteArray_Type)

Definition at line 37 of file bytearrayobject.h.

#define PyByteArray_CheckExact (   self)    (Py_TYPE(self) == &PyByteArray_Type)

Definition at line 38 of file bytearrayobject.h.

#define PyByteArray_GET_SIZE (   self)    (assert(PyByteArray_Check(self)),Py_SIZE(self))

Definition at line 53 of file bytearrayobject.h.


Function Documentation

PyAPI_DATA ( char  )
PyAPI_FUNC ( PyObject ) [read]

Definition at line 2431 of file pythonrun.c.

{
    return PyRun_FileExFlags(fp, p, s, g, l, c, NULL);
}

Definition at line 2410 of file pythonrun.c.

PyAPI_FUNC ( char *  )

Definition at line 1134 of file pystrtod.c.

{
    char **float_strings = lc_float_strings;
    int mode;

    /* Validate format_code, and map upper and lower case. Compute the
       mode and make any adjustments as needed. */
    switch (format_code) {
    /* exponent */
    case 'E':
        float_strings = uc_float_strings;
        format_code = 'e';
        /* Fall through. */
    case 'e':
        mode = 2;
        precision++;
        break;

    /* fixed */
    case 'F':
        float_strings = uc_float_strings;
        format_code = 'f';
        /* Fall through. */
    case 'f':
        mode = 3;
        break;

    /* general */
    case 'G':
        float_strings = uc_float_strings;
        format_code = 'g';
        /* Fall through. */
    case 'g':
        mode = 2;
        /* precision 0 makes no sense for 'g' format; interpret as 1 */
        if (precision == 0)
            precision = 1;
        break;

    /* repr format */
    case 'r':
        mode = 0;
        /* Supplied precision is unused, must be 0. */
        if (precision != 0) {
            PyErr_BadInternalCall();
            return NULL;
        }
        break;

    default:
        PyErr_BadInternalCall();
        return NULL;
    }

    return format_float_short(val, format_code, mode, precision,
                              flags & Py_DTSF_SIGN,
                              flags & Py_DTSF_ADD_DOT_0,
                              flags & Py_DTSF_ALT,
                              float_strings, type);
}

Variable Documentation

Definition at line 43 of file bytearrayobject.h.