annotate Include/bytes_methods.h @ 58664:993f703a61ba

Merged revisions 77484,77487,77561,77570,77593,77603,77608,77667,77702-77703,77739,77858,77887,77889 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77484 | skip.montanaro | 2010-01-13 19:12:34 -0600 (Wed, 13 Jan 2010) | 4 lines Update PyEval_EvalFrame to PyEval_EvalFrameEx. This looks to have been done partially before. Also add a comment describing how this might have to work with different versions of the interpreter. ........ r77487 | ezio.melotti | 2010-01-14 05:34:10 -0600 (Thu, 14 Jan 2010) | 1 line Fixed typo ........ r77561 | georg.brandl | 2010-01-17 02:42:30 -0600 (Sun, 17 Jan 2010) | 1 line #7699: improve datetime docs: straightforward linking to strftime/strptime section, mark classmethods as such. ........ r77570 | georg.brandl | 2010-01-17 06:14:42 -0600 (Sun, 17 Jan 2010) | 1 line Add note about usage of STRINGLIB_EMPTY. ........ r77593 | georg.brandl | 2010-01-17 17:33:53 -0600 (Sun, 17 Jan 2010) | 1 line Fix internal reference. ........ r77603 | benjamin.peterson | 2010-01-18 17:07:56 -0600 (Mon, 18 Jan 2010) | 8 lines data descriptors do not override the class dictionary if __get__ is not defined Adjust documentation and add a test to verify this behavior. See http://mail.python.org/pipermail/python-dev/2010-January/095637.html for discussion. ........ r77608 | gregory.p.smith | 2010-01-19 02:19:03 -0600 (Tue, 19 Jan 2010) | 6 lines Do not compile stubs for the sha2 series hashes in the openssl hashlib module when the openssl version is too old to support them. That leads both compiled code bloat and to unittests attempting to test implementations that don't exist for comparison purposes on such platforms. ........ r77667 | mark.dickinson | 2010-01-21 12:32:27 -0600 (Thu, 21 Jan 2010) | 1 line Add two more test_strtod test values. ........ r77702 | georg.brandl | 2010-01-23 02:43:31 -0600 (Sat, 23 Jan 2010) | 1 line #7762: fix refcount annotation of PyUnicode_Tailmatch(). ........ r77703 | georg.brandl | 2010-01-23 02:47:54 -0600 (Sat, 23 Jan 2010) | 1 line #7725: fix referencing issue. ........ r77739 | benjamin.peterson | 2010-01-24 21:52:52 -0600 (Sun, 24 Jan 2010) | 1 line mention from_float() in error message ........ r77858 | georg.brandl | 2010-01-30 11:57:48 -0600 (Sat, 30 Jan 2010) | 1 line #7802: fix invalid example (heh). ........ r77887 | georg.brandl | 2010-01-31 12:51:49 -0600 (Sun, 31 Jan 2010) | 5 lines Fix-up ftplib documentation: move exception descriptions to toplevel, not inside a class remove attribution in "versionadded" spell and grammar check docstring of FTP_TLS ........ r77889 | michael.foord | 2010-01-31 13:59:26 -0600 (Sun, 31 Jan 2010) | 1 line Minor modification to unittest documentation. ........
author Benjamin Peterson <benjamin@python.org>
date Wed, 03 Feb 2010 02:35:45 +0000
parents 4b4b59f278bf
children d31eaec883eb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43576
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
1 #ifndef Py_BYTES_CTYPE_H
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
2 #define Py_BYTES_CTYPE_H
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
3
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
4 /*
47300
96b34263e448 Renamed PyBytes to PyByteArray
Christian Heimes <christian@cheimes.de>
parents: 46161
diff changeset
5 * The internal implementation behind PyBytes (bytes) and PyByteArray (bytearray)
43576
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
6 * methods of the given names, they operate on ASCII byte strings.
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
7 */
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
8 extern PyObject* _Py_bytes_isspace(const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
9 extern PyObject* _Py_bytes_isalpha(const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
10 extern PyObject* _Py_bytes_isalnum(const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
11 extern PyObject* _Py_bytes_isdigit(const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
12 extern PyObject* _Py_bytes_islower(const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
13 extern PyObject* _Py_bytes_isupper(const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
14 extern PyObject* _Py_bytes_istitle(const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
15
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
16 /* These store their len sized answer in the given preallocated *result arg. */
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
17 extern void _Py_bytes_lower(char *result, const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
18 extern void _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
19 extern void _Py_bytes_title(char *result, char *s, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
20 extern void _Py_bytes_capitalize(char *result, char *s, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
21 extern void _Py_bytes_swapcase(char *result, char *s, Py_ssize_t len);
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
22
53094
4407e4d07084 Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecate
Georg Brandl <georg@python.org>
parents: 47300
diff changeset
23 /* This one gets the raw argument list. */
4407e4d07084 Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecate
Georg Brandl <georg@python.org>
parents: 47300
diff changeset
24 extern PyObject* _Py_bytes_maketrans(PyObject *args);
4407e4d07084 Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecate
Georg Brandl <georg@python.org>
parents: 47300
diff changeset
25
43576
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
26 /* Shared __doc__ strings. */
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
27 extern const char _Py_isspace__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
28 extern const char _Py_isalpha__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
29 extern const char _Py_isalnum__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
30 extern const char _Py_isdigit__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
31 extern const char _Py_islower__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
32 extern const char _Py_isupper__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
33 extern const char _Py_istitle__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
34 extern const char _Py_lower__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
35 extern const char _Py_upper__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
36 extern const char _Py_title__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
37 extern const char _Py_capitalize__doc__[];
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
38 extern const char _Py_swapcase__doc__[];
53094
4407e4d07084 Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecate
Georg Brandl <georg@python.org>
parents: 47300
diff changeset
39 extern const char _Py_maketrans__doc__[];
43576
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
40
53543
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
41 /* These are left in for backward compatibility and will be removed
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
42 in 2.8/3.2 */
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
43 #define ISLOWER(c) Py_ISLOWER(c)
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
44 #define ISUPPER(c) Py_ISUPPER(c)
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
45 #define ISALPHA(c) Py_ISALPHA(c)
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
46 #define ISDIGIT(c) Py_ISDIGIT(c)
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
47 #define ISXDIGIT(c) Py_ISXDIGIT(c)
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
48 #define ISALNUM(c) Py_ISALNUM(c)
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
49 #define ISSPACE(c) Py_ISSPACE(c)
43576
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
50
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
51 #undef islower
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
52 #define islower(c) undefined_islower(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
53 #undef isupper
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
54 #define isupper(c) undefined_isupper(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
55 #undef isalpha
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
56 #define isalpha(c) undefined_isalpha(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
57 #undef isdigit
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
58 #define isdigit(c) undefined_isdigit(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
59 #undef isxdigit
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
60 #define isxdigit(c) undefined_isxdigit(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
61 #undef isalnum
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
62 #define isalnum(c) undefined_isalnum(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
63 #undef isspace
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
64 #define isspace(c) undefined_isspace(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
65
53543
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
66 /* These are left in for backward compatibility and will be removed
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
67 in 2.8/3.2 */
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
68 #define TOLOWER(c) Py_TOLOWER(c)
4b4b59f278bf Merged revisions 72040 via svnmerge from
Eric Smith <eric@trueblade.com>
parents: 53094
diff changeset
69 #define TOUPPER(c) Py_TOUPPER(c)
43576
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
70
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
71 #undef tolower
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
72 #define tolower(c) undefined_tolower(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
73 #undef toupper
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
74 #define toupper(c) undefined_toupper(c)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
75
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
76 /* this is needed because some docs are shared from the .o, not static */
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
77 #define PyDoc_STRVAR_shared(name,str) const char name[] = PyDoc_STR(str)
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
78
697cc31a83f6 For PEP3137: Adds missing methods to the mutable PyBytes object (soon
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
79 #endif /* !Py_BYTES_CTYPE_H */