Gregory P. Smith | 60d241f | 2007-10-16 06:31:30 +0000 | [diff] [blame] | 1 | #ifndef Py_BYTES_CTYPE_H |
| 2 | #define Py_BYTES_CTYPE_H |
| 3 | |
| 4 | /* |
Christian Heimes | 9c4756e | 2008-05-26 13:22:05 +0000 | [diff] [blame] | 5 | * The internal implementation behind PyBytes (bytes) and PyByteArray (bytearray) |
Gregory P. Smith | 60d241f | 2007-10-16 06:31:30 +0000 | [diff] [blame] | 6 | * methods of the given names, they operate on ASCII byte strings. |
| 7 | */ |
| 8 | extern PyObject* _Py_bytes_isspace(const char *cptr, Py_ssize_t len); |
| 9 | extern PyObject* _Py_bytes_isalpha(const char *cptr, Py_ssize_t len); |
| 10 | extern PyObject* _Py_bytes_isalnum(const char *cptr, Py_ssize_t len); |
| 11 | extern PyObject* _Py_bytes_isdigit(const char *cptr, Py_ssize_t len); |
| 12 | extern PyObject* _Py_bytes_islower(const char *cptr, Py_ssize_t len); |
| 13 | extern PyObject* _Py_bytes_isupper(const char *cptr, Py_ssize_t len); |
| 14 | extern PyObject* _Py_bytes_istitle(const char *cptr, Py_ssize_t len); |
| 15 | |
| 16 | /* These store their len sized answer in the given preallocated *result arg. */ |
| 17 | extern void _Py_bytes_lower(char *result, const char *cptr, Py_ssize_t len); |
| 18 | extern void _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t len); |
| 19 | extern void _Py_bytes_title(char *result, char *s, Py_ssize_t len); |
| 20 | extern void _Py_bytes_capitalize(char *result, char *s, Py_ssize_t len); |
| 21 | extern void _Py_bytes_swapcase(char *result, char *s, Py_ssize_t len); |
| 22 | |
Georg Brandl | abc3877 | 2009-04-12 15:51:51 +0000 | [diff] [blame] | 23 | /* This one gets the raw argument list. */ |
| 24 | extern PyObject* _Py_bytes_maketrans(PyObject *args); |
| 25 | |
Gregory P. Smith | 60d241f | 2007-10-16 06:31:30 +0000 | [diff] [blame] | 26 | /* Shared __doc__ strings. */ |
| 27 | extern const char _Py_isspace__doc__[]; |
| 28 | extern const char _Py_isalpha__doc__[]; |
| 29 | extern const char _Py_isalnum__doc__[]; |
| 30 | extern const char _Py_isdigit__doc__[]; |
| 31 | extern const char _Py_islower__doc__[]; |
| 32 | extern const char _Py_isupper__doc__[]; |
| 33 | extern const char _Py_istitle__doc__[]; |
| 34 | extern const char _Py_lower__doc__[]; |
| 35 | extern const char _Py_upper__doc__[]; |
| 36 | extern const char _Py_title__doc__[]; |
| 37 | extern const char _Py_capitalize__doc__[]; |
| 38 | extern const char _Py_swapcase__doc__[]; |
Georg Brandl | abc3877 | 2009-04-12 15:51:51 +0000 | [diff] [blame] | 39 | extern const char _Py_maketrans__doc__[]; |
Gregory P. Smith | 60d241f | 2007-10-16 06:31:30 +0000 | [diff] [blame] | 40 | |
Gregory P. Smith | 60d241f | 2007-10-16 06:31:30 +0000 | [diff] [blame] | 41 | /* this is needed because some docs are shared from the .o, not static */ |
| 42 | #define PyDoc_STRVAR_shared(name,str) const char name[] = PyDoc_STR(str) |
| 43 | |
| 44 | #endif /* !Py_BYTES_CTYPE_H */ |