Back to index

python3.2  3.2.2
Classes | Defines | Functions | Variables
bytesobject.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  PyBytesObject

Defines

#define PyBytes_Check(op)   PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BYTES_SUBCLASS)
#define PyBytes_CheckExact(op)   (Py_TYPE(op) == &PyBytes_Type)
#define PyBytes_AS_STRING(op)
#define PyBytes_GET_SIZE(op)   (assert(PyBytes_Check(op)),Py_SIZE(op))
#define F_LJUST   (1<<0)
#define F_SIGN   (1<<1)
#define F_BLANK   (1<<2)
#define F_ALT   (1<<3)
#define F_ZERO   (1<<4)

Functions

 PyAPI_DATA (PyTypeObject) PyBytes_Type
 PyAPI_FUNC (PyObject *) PyBytes_FromStringAndSize(const char *
va_list Py_GCC_ATTRIBUTE ((format(printf, 1, 0)))
 Py_GCC_ATTRIBUTE ((format(printf, 1, 2)))
 PyAPI_FUNC (Py_ssize_t) PyBytes_Size(PyObject *)
 PyAPI_FUNC (char *) PyBytes_AsString(PyObject *)
 PyAPI_FUNC (void) PyBytes_Concat(PyObject **

Variables

 Py_ssize_t
 int
PyObjectx
register char ** s
register char register Py_ssize_tlen
Py_ssize_t n_buffer
Py_ssize_t char * digits
Py_ssize_t char Py_ssize_t n_digits
Py_ssize_t char Py_ssize_t
Py_ssize_t 
min_width
Py_ssize_t char Py_ssize_t
Py_ssize_t const char * 
grouping
Py_ssize_t char Py_ssize_t
Py_ssize_t const char const
char * 
thousands_sep

Class Documentation

struct PyBytesObject

Definition at line 31 of file bytesobject.h.

Class Members
PyObject_VAR_HEAD Py_hash_t ob_shash
char ob_sval

Define Documentation

#define F_ALT   (1<<3)

Definition at line 124 of file bytesobject.h.

#define F_BLANK   (1<<2)

Definition at line 123 of file bytesobject.h.

#define F_LJUST   (1<<0)

Definition at line 121 of file bytesobject.h.

#define F_SIGN   (1<<1)

Definition at line 122 of file bytesobject.h.

#define F_ZERO   (1<<4)

Definition at line 125 of file bytesobject.h.

#define PyBytes_AS_STRING (   op)
Value:
(assert(PyBytes_Check(op)), \
                                (((PyBytesObject *)(op))->ob_sval))

Definition at line 74 of file bytesobject.h.

Definition at line 47 of file bytesobject.h.

#define PyBytes_CheckExact (   op)    (Py_TYPE(op) == &PyBytes_Type)

Definition at line 49 of file bytesobject.h.

#define PyBytes_GET_SIZE (   op)    (assert(PyBytes_Check(op)),Py_SIZE(op))

Definition at line 76 of file bytesobject.h.


Function Documentation

va_list Py_GCC_ATTRIBUTE ( (format(printf, 1, 0))  )
Py_GCC_ATTRIBUTE ( (format(printf, 1, 2))  )
PyAPI_FUNC ( PyObject ) const

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);
}

Here is the call graph for this function:


Variable Documentation

Definition at line 103 of file bytesobject.h.

Definition at line 112 of file bytesobject.h.

typedef int

Definition at line 60 of file bytesobject.h.

register char register Py_ssize_t* len

Definition at line 92 of file bytesobject.h.

Definition at line 103 of file bytesobject.h.

Definition at line 103 of file bytesobject.h.

Definition at line 103 of file bytesobject.h.

char int const char Py_ssize_t

Definition at line 51 of file bytesobject.h.

register char** s

Definition at line 92 of file bytesobject.h.

Definition at line 112 of file bytesobject.h.

Definition at line 82 of file bytesobject.h.