Back to index

python3.2  3.2.2
Defines | Functions | Variables
split.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MAX_PREALLOC   12
#define PREALLOC_SIZE(maxsplit)   (maxsplit >= MAX_PREALLOC ? MAX_PREALLOC : maxsplit+1)
#define SPLIT_APPEND(data, left, right)
#define SPLIT_ADD(data, left, right)
#define FIX_PREALLOC_SIZE(list)   Py_SIZE(list) = count

Functions

 Py_LOCAL_INLINE (PyObject *) stringlib_split_whitespace(PyObject *str_obj

Variables

const STRINGLIB_CHARstr
const STRINGLIB_CHAR Py_ssize_t str_len

Define Documentation

#define FIX_PREALLOC_SIZE (   list)    Py_SIZE(list) = count

Definition at line 54 of file split.h.

#define MAX_PREALLOC   12

Definition at line 17 of file split.h.

Definition at line 20 of file split.h.

#define SPLIT_ADD (   data,
  left,
  right 
)
Value:
{          \
    sub = STRINGLIB_NEW((data) + (left),        \
                        (right) - (left));      \
    if (sub == NULL)                            \
        goto onError;                           \
    if (count < MAX_PREALLOC) {                 \
        PyList_SET_ITEM(list, count, sub);      \
    } else {                                    \
        if (PyList_Append(list, sub)) {         \
            Py_DECREF(sub);                     \
            goto onError;                       \
        }                                       \
        else                                    \
            Py_DECREF(sub);                     \
    }                                           \
    count++; }

Definition at line 35 of file split.h.

#define SPLIT_APPEND (   data,
  left,
  right 
)
Value:
sub = STRINGLIB_NEW((data) + (left),        \
                        (right) - (left));      \
    if (sub == NULL)                            \
        goto onError;                           \
    if (PyList_Append(list, sub)) {             \
        Py_DECREF(sub);                         \
        goto onError;                           \
    }                                           \
    else                                        \
        Py_DECREF(sub);

Definition at line 23 of file split.h.


Function Documentation


Variable Documentation

Definition at line 58 of file split.h.

Definition at line 58 of file split.h.