util: remove PyString* aliases on Python 3
We no longer have any users of the legacy PyString* functions. We no
longer need these redefinitions.
After this change, the only reference to "PyString" in the repo is in
watchman's C extension. That isn't our code and porting Mercurial
extensions to Python 3 is not a high priority at the moment. watchman's
C extension will be dealt with later.
--- a/mercurial/util.h Sat Oct 08 22:02:29 2016 +0200
+++ b/mercurial/util.h Sat Oct 08 22:04:56 2016 +0200
@@ -20,47 +20,6 @@
#define PyInt_FromLong PyLong_FromLong
#define PyInt_AsLong PyLong_AsLong
-/*
- Mapping of some of the python < 2.x PyString* functions to py3k's PyUnicode.
-
- The commented names below represent those that are present in the PyBytes
- definitions for python < 2.6 (below in this file) that don't have a direct
- implementation.
-*/
-
-#define PyStringObject PyUnicodeObject
-#define PyString_Type PyUnicode_Type
-
-#define PyString_Check PyUnicode_Check
-#define PyString_CheckExact PyUnicode_CheckExact
-#define PyString_CHECK_INTERNED PyUnicode_CHECK_INTERNED
-#define PyString_AS_STRING PyUnicode_AsLatin1String
-#define PyString_GET_SIZE PyUnicode_GET_SIZE
-
-#define PyString_FromStringAndSize PyUnicode_FromStringAndSize
-#define PyString_FromString PyUnicode_FromString
-#define PyString_FromFormatV PyUnicode_FromFormatV
-#define PyString_FromFormat PyUnicode_FromFormat
-/* #define PyString_Size PyUnicode_GET_SIZE */
-/* #define PyString_AsString */
-/* #define PyString_Repr */
-#define PyString_Concat PyUnicode_Concat
-#define PyString_ConcatAndDel PyUnicode_AppendAndDel
-#define _PyString_Resize PyUnicode_Resize
-/* #define _PyString_Eq */
-#define PyString_Format PyUnicode_Format
-/* #define _PyString_FormatLong */
-/* #define PyString_DecodeEscape */
-#define _PyString_Join PyUnicode_Join
-#define PyString_Decode PyUnicode_Decode
-#define PyString_Encode PyUnicode_Encode
-#define PyString_AsEncodedObject PyUnicode_AsEncodedObject
-#define PyString_AsEncodedString PyUnicode_AsEncodedString
-#define PyString_AsDecodedObject PyUnicode_AsDecodedObject
-#define PyString_AsDecodedString PyUnicode_AsDecodedUnicode
-/* #define PyString_AsStringAndSize */
-#define _PyString_InsertThousandsGrouping _PyUnicode_InsertThousandsGrouping
-
#endif /* PY_MAJOR_VERSION */
typedef struct {