jpayne@69
|
1 #ifndef Py_LIMITED_API
|
jpayne@69
|
2 #ifndef Py_BYTES_CTYPE_H
|
jpayne@69
|
3 #define Py_BYTES_CTYPE_H
|
jpayne@69
|
4
|
jpayne@69
|
5 /*
|
jpayne@69
|
6 * The internal implementation behind PyBytes (bytes) and PyByteArray (bytearray)
|
jpayne@69
|
7 * methods of the given names, they operate on ASCII byte strings.
|
jpayne@69
|
8 */
|
jpayne@69
|
9 extern PyObject* _Py_bytes_isspace(const char *cptr, Py_ssize_t len);
|
jpayne@69
|
10 extern PyObject* _Py_bytes_isalpha(const char *cptr, Py_ssize_t len);
|
jpayne@69
|
11 extern PyObject* _Py_bytes_isalnum(const char *cptr, Py_ssize_t len);
|
jpayne@69
|
12 extern PyObject* _Py_bytes_isascii(const char *cptr, Py_ssize_t len);
|
jpayne@69
|
13 extern PyObject* _Py_bytes_isdigit(const char *cptr, Py_ssize_t len);
|
jpayne@69
|
14 extern PyObject* _Py_bytes_islower(const char *cptr, Py_ssize_t len);
|
jpayne@69
|
15 extern PyObject* _Py_bytes_isupper(const char *cptr, Py_ssize_t len);
|
jpayne@69
|
16 extern PyObject* _Py_bytes_istitle(const char *cptr, Py_ssize_t len);
|
jpayne@69
|
17
|
jpayne@69
|
18 /* These store their len sized answer in the given preallocated *result arg. */
|
jpayne@69
|
19 extern void _Py_bytes_lower(char *result, const char *cptr, Py_ssize_t len);
|
jpayne@69
|
20 extern void _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t len);
|
jpayne@69
|
21 extern void _Py_bytes_title(char *result, const char *s, Py_ssize_t len);
|
jpayne@69
|
22 extern void _Py_bytes_capitalize(char *result, const char *s, Py_ssize_t len);
|
jpayne@69
|
23 extern void _Py_bytes_swapcase(char *result, const char *s, Py_ssize_t len);
|
jpayne@69
|
24
|
jpayne@69
|
25 extern PyObject *_Py_bytes_find(const char *str, Py_ssize_t len, PyObject *args);
|
jpayne@69
|
26 extern PyObject *_Py_bytes_index(const char *str, Py_ssize_t len, PyObject *args);
|
jpayne@69
|
27 extern PyObject *_Py_bytes_rfind(const char *str, Py_ssize_t len, PyObject *args);
|
jpayne@69
|
28 extern PyObject *_Py_bytes_rindex(const char *str, Py_ssize_t len, PyObject *args);
|
jpayne@69
|
29 extern PyObject *_Py_bytes_count(const char *str, Py_ssize_t len, PyObject *args);
|
jpayne@69
|
30 extern int _Py_bytes_contains(const char *str, Py_ssize_t len, PyObject *arg);
|
jpayne@69
|
31 extern PyObject *_Py_bytes_startswith(const char *str, Py_ssize_t len, PyObject *args);
|
jpayne@69
|
32 extern PyObject *_Py_bytes_endswith(const char *str, Py_ssize_t len, PyObject *args);
|
jpayne@69
|
33
|
jpayne@69
|
34 /* The maketrans() static method. */
|
jpayne@69
|
35 extern PyObject* _Py_bytes_maketrans(Py_buffer *frm, Py_buffer *to);
|
jpayne@69
|
36
|
jpayne@69
|
37 /* Shared __doc__ strings. */
|
jpayne@69
|
38 extern const char _Py_isspace__doc__[];
|
jpayne@69
|
39 extern const char _Py_isalpha__doc__[];
|
jpayne@69
|
40 extern const char _Py_isalnum__doc__[];
|
jpayne@69
|
41 extern const char _Py_isascii__doc__[];
|
jpayne@69
|
42 extern const char _Py_isdigit__doc__[];
|
jpayne@69
|
43 extern const char _Py_islower__doc__[];
|
jpayne@69
|
44 extern const char _Py_isupper__doc__[];
|
jpayne@69
|
45 extern const char _Py_istitle__doc__[];
|
jpayne@69
|
46 extern const char _Py_lower__doc__[];
|
jpayne@69
|
47 extern const char _Py_upper__doc__[];
|
jpayne@69
|
48 extern const char _Py_title__doc__[];
|
jpayne@69
|
49 extern const char _Py_capitalize__doc__[];
|
jpayne@69
|
50 extern const char _Py_swapcase__doc__[];
|
jpayne@69
|
51 extern const char _Py_count__doc__[];
|
jpayne@69
|
52 extern const char _Py_find__doc__[];
|
jpayne@69
|
53 extern const char _Py_index__doc__[];
|
jpayne@69
|
54 extern const char _Py_rfind__doc__[];
|
jpayne@69
|
55 extern const char _Py_rindex__doc__[];
|
jpayne@69
|
56 extern const char _Py_startswith__doc__[];
|
jpayne@69
|
57 extern const char _Py_endswith__doc__[];
|
jpayne@69
|
58 extern const char _Py_maketrans__doc__[];
|
jpayne@69
|
59 extern const char _Py_expandtabs__doc__[];
|
jpayne@69
|
60 extern const char _Py_ljust__doc__[];
|
jpayne@69
|
61 extern const char _Py_rjust__doc__[];
|
jpayne@69
|
62 extern const char _Py_center__doc__[];
|
jpayne@69
|
63 extern const char _Py_zfill__doc__[];
|
jpayne@69
|
64
|
jpayne@69
|
65 /* this is needed because some docs are shared from the .o, not static */
|
jpayne@69
|
66 #define PyDoc_STRVAR_shared(name,str) const char name[] = PyDoc_STR(str)
|
jpayne@69
|
67
|
jpayne@69
|
68 #endif /* !Py_BYTES_CTYPE_H */
|
jpayne@69
|
69 #endif /* !Py_LIMITED_API */
|