Mercurial > cpython-lru_cache-weakref
annotate Objects/stringlib/README.txt @ 65035:87f4b32905df 2.7
Cosmetic fix to use print function.
| author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> |
|---|---|
| date | Fri, 01 Oct 2010 10:48:47 +0000 |
| parents | 4547a9bff7c7 |
| children |
| rev | line source |
|---|---|
|
38381
b32f9bb2e077
needforspeed: stringlib refactoring (in progress)
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
1 bits shared by the stringobject and unicodeobject implementations (and |
|
b32f9bb2e077
needforspeed: stringlib refactoring (in progress)
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
2 possibly other modules, in a not too distant future). |
|
b32f9bb2e077
needforspeed: stringlib refactoring (in progress)
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
3 |
|
b32f9bb2e077
needforspeed: stringlib refactoring (in progress)
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
4 the stuff in here is included into relevant places; see the individual |
|
b32f9bb2e077
needforspeed: stringlib refactoring (in progress)
Fredrik Lundh <fredrik@pythonware.com>
parents:
diff
changeset
|
5 source files for details. |
|
38424
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
6 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
7 -------------------------------------------------------------------- |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
8 the following defines used by the different modules: |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
9 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
10 STRINGLIB_CHAR |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
11 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
12 the type used to hold a character (char or Py_UNICODE) |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
13 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
14 STRINGLIB_EMPTY |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
15 |
|
58382
4547a9bff7c7
Add note about usage of STRINGLIB_EMPTY.
Georg Brandl <georg@python.org>
parents:
58288
diff
changeset
|
16 a PyObject representing the empty string, only to be used if |
|
4547a9bff7c7
Add note about usage of STRINGLIB_EMPTY.
Georg Brandl <georg@python.org>
parents:
58288
diff
changeset
|
17 STRINGLIB_MUTABLE is 0 |
|
38424
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
18 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
19 Py_ssize_t STRINGLIB_LEN(PyObject*) |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
20 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
21 returns the length of the given string object (which must be of the |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
22 right type) |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
23 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
24 PyObject* STRINGLIB_NEW(STRINGLIB_CHAR*, Py_ssize_t) |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
25 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
26 creates a new string object |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
27 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
28 STRINGLIB_CHAR* STRINGLIB_STR(PyObject*) |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
29 |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
30 returns the pointer to the character data for the given string |
|
3d81faf47af7
needforspeed: more stringlib refactoring
Fredrik Lundh <fredrik@pythonware.com>
parents:
38381
diff
changeset
|
31 object (which must be of the right type) |
|
58288
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
32 |
|
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
33 int STRINGLIB_CHECK_EXACT(PyObject *) |
|
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
34 |
|
58382
4547a9bff7c7
Add note about usage of STRINGLIB_EMPTY.
Georg Brandl <georg@python.org>
parents:
58288
diff
changeset
|
35 returns true if the object is an instance of our type, not a subclass |
|
58288
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
36 |
|
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
37 STRINGLIB_MUTABLE |
|
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
38 |
|
58382
4547a9bff7c7
Add note about usage of STRINGLIB_EMPTY.
Georg Brandl <georg@python.org>
parents:
58288
diff
changeset
|
39 must be 0 or 1 to tell the cpp macros in stringlib code if the object |
|
4547a9bff7c7
Add note about usage of STRINGLIB_EMPTY.
Georg Brandl <georg@python.org>
parents:
58288
diff
changeset
|
40 being operated on is mutable or not |
