We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_PyUnicode_AsString
PyUnicode_AsUTF8
1 parent d764900 commit c18be83Copy full SHA for c18be83
win32/src/PyWinTypes.h
@@ -52,12 +52,8 @@
52
// Macro to handle PyObject layout changes in Py3k
53
#define PYWIN_OBJECT_HEAD PyVarObject_HEAD_INIT(NULL, 0)
54
55
-/* Attribute names are passed as Unicode in Py3k, so use a macro to
56
- switch between string and unicode conversion. This function is not
57
- documented, but is used extensively in the Python codebase itself,
58
- so it's reasonable to assume it won't disappear anytime soon.
59
-*/
60
-#define PYWIN_ATTR_CONVERT (char *)_PyUnicode_AsString
+// This macro is kept for legacy reason as it's casting from `const char *` to `char *`
+#define PYWIN_ATTR_CONVERT (char *)PyUnicode_AsUTF8
61
62
typedef Py_ssize_t Py_hash_t;
63
0 commit comments