Commit 0f6ddce0 authored by Robert Bradshaw's avatar Robert Bradshaw

Let signed char == char == unsigned char for buffer comparison.

parent 6bcc8fd8
......@@ -533,9 +533,13 @@ static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
continue;
}
if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
/* special case -- chars don't care about sign */
} else {
__Pyx_BufFmt_RaiseExpected(ctx);
return -1;
}
}
offset = ctx->head->parent_offset + field->offset;
if (ctx->fmt_offset != offset) {
......@@ -840,8 +844,14 @@ __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
return 1;
if (a->size != b->size || a->typegroup != b->typegroup ||
a->is_unsigned != b->is_unsigned || a->ndim != b->ndim)
a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
if (a->typegroup == 'H' || b->typegroup == 'H') {
/* Special case for chars */
return a->size == b->size;
} else {
return 0;
}
}
if (a->ndim) {
/* Verify multidimensional C arrays */
......
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