We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e457b5f commit 22b8dd1Copy full SHA for 22b8dd1
1 file changed
fuseparts/_fusemodule.c
@@ -94,12 +94,16 @@
94
PyErr_SetString(PyExc_ValueError, "non-decodable filename");
95
return NULL;
96
}
97
-
+ static inline Py_ssize_t PyString_Size(PyObject *s) {
98
+ Py_ssize_t result = -1;
99
+ (void)PyUnicode_AsUTF8AndSize(s, &result);
100
+ return result;
101
+ }
102
#else
103
#define PyString_AsString PyUnicode_AsUTF8
104
+ #define PyString_Size PyUnicode_GET_LENGTH
105
#endif
106
#define PyString_Check PyUnicode_Check
- #define PyString_Size PyUnicode_GET_LENGTH
107
108
109
#ifdef FIX_PATH_DECODING
0 commit comments