summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortelamonian <mklein@jhu.edu>2018-10-22 20:35:39 -0400
committerStefan Behnel <stefan_ml@behnel.de>2019-09-10 14:25:52 +0100
commitc5895c6db53312b29577460302097b7054705e48 (patch)
treefd474ddd7c2333574db2085c9bec4f5095415c34
parentf275be924d6b65b23f09bc1c36fac1d2dd9e2533 (diff)
downloadcython-c5895c6db53312b29577460302097b7054705e48.tar.gz
fixes #2675
-rw-r--r--Cython/Utility/Buffer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Cython/Utility/Buffer.c b/Cython/Utility/Buffer.c
index 7f3a0b15e..68a600d0c 100644
--- a/Cython/Utility/Buffer.c
+++ b/Cython/Utility/Buffer.c
@@ -298,6 +298,7 @@ static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
switch (ch) {
+ case '?': return "'bool'";
case 'c': return "'char'";
case 'b': return "'signed char'";
case 'B': return "'unsigned char'";
@@ -342,7 +343,7 @@ static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
switch (ch) {
- case 'c': case 'b': case 'B': case 's': case 'p': return 1;
+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
case 'h': case 'H': return sizeof(short);
case 'i': case 'I': return sizeof(int);
case 'l': case 'L': return sizeof(long);
@@ -431,7 +432,7 @@ static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
case 'b': case 'h': case 'i':
case 'l': case 'q': case 's': case 'p':
return 'I';
- case 'B': case 'H': case 'I': case 'L': case 'Q':
+ case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
return 'U';
case 'f': case 'd': case 'g':
return (is_complex ? 'C' : 'R');
@@ -752,7 +753,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha
return NULL;
}
CYTHON_FALLTHROUGH;
- case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
+ case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
case 'l': case 'L': case 'q': case 'Q':
case 'f': case 'd': case 'g':
case 'O': case 'p':