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

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

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