Chris@87: #ifndef Py_BYTES_CTYPE_H Chris@87: #define Py_BYTES_CTYPE_H Chris@87: Chris@87: /* Chris@87: * The internal implementation behind PyString (bytes) and PyBytes (buffer) Chris@87: * methods of the given names, they operate on ASCII byte strings. Chris@87: */ Chris@87: extern PyObject* _Py_bytes_isspace(const char *cptr, Py_ssize_t len); Chris@87: extern PyObject* _Py_bytes_isalpha(const char *cptr, Py_ssize_t len); Chris@87: extern PyObject* _Py_bytes_isalnum(const char *cptr, Py_ssize_t len); Chris@87: extern PyObject* _Py_bytes_isdigit(const char *cptr, Py_ssize_t len); Chris@87: extern PyObject* _Py_bytes_islower(const char *cptr, Py_ssize_t len); Chris@87: extern PyObject* _Py_bytes_isupper(const char *cptr, Py_ssize_t len); Chris@87: extern PyObject* _Py_bytes_istitle(const char *cptr, Py_ssize_t len); Chris@87: Chris@87: /* These store their len sized answer in the given preallocated *result arg. */ Chris@87: extern void _Py_bytes_lower(char *result, const char *cptr, Py_ssize_t len); Chris@87: extern void _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t len); Chris@87: extern void _Py_bytes_title(char *result, char *s, Py_ssize_t len); Chris@87: extern void _Py_bytes_capitalize(char *result, char *s, Py_ssize_t len); Chris@87: extern void _Py_bytes_swapcase(char *result, char *s, Py_ssize_t len); Chris@87: Chris@87: /* Shared __doc__ strings. */ Chris@87: extern const char _Py_isspace__doc__[]; Chris@87: extern const char _Py_isalpha__doc__[]; Chris@87: extern const char _Py_isalnum__doc__[]; Chris@87: extern const char _Py_isdigit__doc__[]; Chris@87: extern const char _Py_islower__doc__[]; Chris@87: extern const char _Py_isupper__doc__[]; Chris@87: extern const char _Py_istitle__doc__[]; Chris@87: extern const char _Py_lower__doc__[]; Chris@87: extern const char _Py_upper__doc__[]; Chris@87: extern const char _Py_title__doc__[]; Chris@87: extern const char _Py_capitalize__doc__[]; Chris@87: extern const char _Py_swapcase__doc__[]; Chris@87: Chris@87: /* These are left in for backward compatibility and will be removed Chris@87: in 2.8/3.2 */ Chris@87: #define ISLOWER(c) Py_ISLOWER(c) Chris@87: #define ISUPPER(c) Py_ISUPPER(c) Chris@87: #define ISALPHA(c) Py_ISALPHA(c) Chris@87: #define ISDIGIT(c) Py_ISDIGIT(c) Chris@87: #define ISXDIGIT(c) Py_ISXDIGIT(c) Chris@87: #define ISALNUM(c) Py_ISALNUM(c) Chris@87: #define ISSPACE(c) Py_ISSPACE(c) Chris@87: Chris@87: #undef islower Chris@87: #define islower(c) undefined_islower(c) Chris@87: #undef isupper Chris@87: #define isupper(c) undefined_isupper(c) Chris@87: #undef isalpha Chris@87: #define isalpha(c) undefined_isalpha(c) Chris@87: #undef isdigit Chris@87: #define isdigit(c) undefined_isdigit(c) Chris@87: #undef isxdigit Chris@87: #define isxdigit(c) undefined_isxdigit(c) Chris@87: #undef isalnum Chris@87: #define isalnum(c) undefined_isalnum(c) Chris@87: #undef isspace Chris@87: #define isspace(c) undefined_isspace(c) Chris@87: Chris@87: /* These are left in for backward compatibility and will be removed Chris@87: in 2.8/3.2 */ Chris@87: #define TOLOWER(c) Py_TOLOWER(c) Chris@87: #define TOUPPER(c) Py_TOUPPER(c) Chris@87: Chris@87: #undef tolower Chris@87: #define tolower(c) undefined_tolower(c) Chris@87: #undef toupper Chris@87: #define toupper(c) undefined_toupper(c) Chris@87: Chris@87: /* this is needed because some docs are shared from the .o, not static */ Chris@87: #define PyDoc_STRVAR_shared(name,str) const char name[] = PyDoc_STR(str) Chris@87: Chris@87: #endif /* !Py_BYTES_CTYPE_H */