* normalize endian character: always return 'I', '<' or '>' */
| 37 | * normalize endian character: always return 'I', '<' or '>' |
| 38 | */ |
| 39 | static char _normalize_byteorder(char byteorder) |
| 40 | { |
| 41 | switch(byteorder) { |
| 42 | case '=': |
| 43 | if (PyArray_GetEndianness() == NPY_CPU_BIG) { |
| 44 | return '>'; |
| 45 | } |
| 46 | else { |
| 47 | return '<'; |
| 48 | } |
| 49 | default: |
| 50 | return byteorder; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /* |
| 55 | * Return true if descr is a builtin type |
no test coverage detected