diff options
author | Olly Betts <olly@survex.com> | 2022-01-27 09:27:42 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2022-01-27 09:32:25 +1300 |
commit | 79638073089a99034d0e6c7544582a7a010e8082 (patch) | |
tree | 8e4b1979d69bb76b6efdac0f255d27eaf2d0a5ce | |
parent | 07f5b37c30915dc38b0cbe8b6d0912f4d2794c86 (diff) | |
download | swig-79638073089a99034d0e6c7544582a7a010e8082.tar.gz |
[python] Remove unused bogus fallback macro
This fallback version of PyString_AS_STRING() for Python 3 makes use of
PyUnicode_AS_STRING, but I can find no evidence that ever existed in
Python - all references I've found are to SWIG or SWIG-generated code.
The only uses of PyString_AS_STRING() in SWIG generated code are for
Python 2 #if-branches, so this fallback is never used by SWIG.
Because it doesn't work it can't be usefully used in user interface
files either, so let's remove it to avoid potential user confusion
(such as #987).
-rw-r--r-- | Lib/python/pyhead.swg | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Lib/python/pyhead.swg b/Lib/python/pyhead.swg index 4ae8bbe2e..669990719 100644 --- a/Lib/python/pyhead.swg +++ b/Lib/python/pyhead.swg @@ -13,7 +13,6 @@ #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif |