mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #18701: Remove support of old CPython versions (<3.0) from C code.
This commit is contained in:
parent
5c03d20757
commit
8fa8ee3970
13 changed files with 4 additions and 58 deletions
|
@ -24,13 +24,8 @@
|
|||
#define STRINGLIB_CHECK PyUnicode_Check
|
||||
#define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact
|
||||
|
||||
#if PY_VERSION_HEX < 0x03000000
|
||||
#define STRINGLIB_TOSTR PyObject_Unicode
|
||||
#define STRINGLIB_TOASCII PyObject_Repr
|
||||
#else
|
||||
#define STRINGLIB_TOSTR PyObject_Str
|
||||
#define STRINGLIB_TOASCII PyObject_ASCII
|
||||
#endif
|
||||
|
||||
#define STRINGLIB_WANT_CONTAINS_OBJ 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue