We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22004fb commit 8f52814Copy full SHA for 8f52814
1 file changed
Modules/_ctypes/_ctypes.c
@@ -5686,7 +5686,7 @@ Pointer_subscript(PyObject *myself, PyObject *item)
5686
if (step == 1) {
5687
PyObject *res;
5688
LOCK_PTR(self);
5689
- wchar_t *ptr = *(void **)self;
+ wchar_t *ptr = *(wchar_t **)self->b_ptr;
5690
res = PyUnicode_FromWideChar(ptr + start,
5691
len);
5692
UNLOCK_PTR(self);
@@ -5696,7 +5696,7 @@ Pointer_subscript(PyObject *myself, PyObject *item)
5696
if (dest == NULL)
5697
return PyErr_NoMemory();
5698
5699
5700
for (cur = start, i = 0; i < len; cur += step, i++) {
5701
dest[i] = ptr[cur];
5702
}
0 commit comments