1. Armin Rigo
  2. cpython-withatomic

Source

cpython-withatomic / Objects / stringlib /

The branch 'legacy-trunk' does not exist.
Filename Size Date modified Message
..
853 B
713 B
2.6 KB
4.2 KB
3.9 KB
45.1 KB
7.0 KB
2.3 KB
39.9 KB
1.2 KB
9.2 KB
1.3 KB
bits shared by the stringobject and unicodeobject implementations (and
possibly other modules, in a not too distant future).

the stuff in here is included into relevant places; see the individual
source files for details.

--------------------------------------------------------------------
the following defines used by the different modules:

STRINGLIB_CHAR

    the type used to hold a character (char or Py_UNICODE)

STRINGLIB_EMPTY

    a PyObject representing the empty string

Py_ssize_t STRINGLIB_LEN(PyObject*)

    returns the length of the given string object (which must be of the
    right type)

PyObject* STRINGLIB_NEW(STRINGLIB_CHAR*, Py_ssize_t)

    creates a new string object

STRINGLIB_CHAR* STRINGLIB_STR(PyObject*)

    returns the pointer to the character data for the given string
    object (which must be of the right type)