blob: d948386d8c1fccd13c1f94b9568e1ef5060983c1 [file] [log] [blame]
Fredrik Lundha50d2012006-05-26 17:04:58 +00001bits shared by the stringobject and unicodeobject implementations (and
2possibly other modules, in a not too distant future).
3
4the stuff in here is included into relevant places; see the individual
5source files for details.
Fredrik Lundh2d23d5b2006-05-27 10:05:10 +00006
7--------------------------------------------------------------------
8the following defines used by the different modules:
9
10STRINGLIB_CHAR
11
12 the type used to hold a character (char or Py_UNICODE)
13
14STRINGLIB_EMPTY
15
16 a PyObject representing the empty string
17
Fredrik Lundh2d23d5b2006-05-27 10:05:10 +000018Py_ssize_t STRINGLIB_LEN(PyObject*)
19
20 returns the length of the given string object (which must be of the
21 right type)
22
23PyObject* STRINGLIB_NEW(STRINGLIB_CHAR*, Py_ssize_t)
24
25 creates a new string object
26
27STRINGLIB_CHAR* STRINGLIB_STR(PyObject*)
28
29 returns the pointer to the character data for the given string
30 object (which must be of the right type)