Commit e6eda852 authored by Martin v. Löwis's avatar Martin v. Löwis

Correct casts to char*.

parent 57e44e8b
...@@ -5216,19 +5216,19 @@ slotptr(PyTypeObject *type, int ioffset) ...@@ -5216,19 +5216,19 @@ slotptr(PyTypeObject *type, int ioffset)
assert(offset >= 0); assert(offset >= 0);
assert(offset < offsetof(PyHeapTypeObject, as_buffer)); assert(offset < offsetof(PyHeapTypeObject, as_buffer));
if (offset >= offsetof(PyHeapTypeObject, as_sequence)) { if (offset >= offsetof(PyHeapTypeObject, as_sequence)) {
ptr = (void *)type->tp_as_sequence; ptr = (char *)type->tp_as_sequence;
offset -= offsetof(PyHeapTypeObject, as_sequence); offset -= offsetof(PyHeapTypeObject, as_sequence);
} }
else if (offset >= offsetof(PyHeapTypeObject, as_mapping)) { else if (offset >= offsetof(PyHeapTypeObject, as_mapping)) {
ptr = (void *)type->tp_as_mapping; ptr = (char *)type->tp_as_mapping;
offset -= offsetof(PyHeapTypeObject, as_mapping); offset -= offsetof(PyHeapTypeObject, as_mapping);
} }
else if (offset >= offsetof(PyHeapTypeObject, as_number)) { else if (offset >= offsetof(PyHeapTypeObject, as_number)) {
ptr = (void *)type->tp_as_number; ptr = (char *)type->tp_as_number;
offset -= offsetof(PyHeapTypeObject, as_number); offset -= offsetof(PyHeapTypeObject, as_number);
} }
else { else {
ptr = (void *)type; ptr = (char *)type;
} }
if (ptr != NULL) if (ptr != NULL)
ptr += offset; ptr += offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment