| 12119 | return Py_None; |
| 12120 | } |
| 12121 | static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { |
| 12122 | int got_Z = 0; |
| 12123 | while (1) { |
| 12124 | switch(*ts) { |
| 12125 | case 0: |
| 12126 | if (ctx->enc_type != 0 && ctx->head == NULL) { |
| 12127 | __Pyx_BufFmt_RaiseExpected(ctx); |
| 12128 | return NULL; |
| 12129 | } |
| 12130 | if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; |
| 12131 | if (ctx->head != NULL) { |
| 12132 | __Pyx_BufFmt_RaiseExpected(ctx); |
| 12133 | return NULL; |
| 12134 | } |
| 12135 | return ts; |
| 12136 | case ' ': |
| 12137 | case '\r': |
| 12138 | case '\n': |
| 12139 | ++ts; |
| 12140 | break; |
| 12141 | case '<': |
| 12142 | if (!__Pyx_Is_Little_Endian()) { |
| 12143 | PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); |
| 12144 | return NULL; |
| 12145 | } |
| 12146 | ctx->new_packmode = '='; |
| 12147 | ++ts; |
| 12148 | break; |
| 12149 | case '>': |
| 12150 | case '!': |
| 12151 | if (__Pyx_Is_Little_Endian()) { |
| 12152 | PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); |
| 12153 | return NULL; |
| 12154 | } |
| 12155 | ctx->new_packmode = '='; |
| 12156 | ++ts; |
| 12157 | break; |
| 12158 | case '=': |
| 12159 | case '@': |
| 12160 | case '^': |
| 12161 | ctx->new_packmode = *ts++; |
| 12162 | break; |
| 12163 | case 'T': |
| 12164 | { |
| 12165 | const char* ts_after_sub; |
| 12166 | size_t i, struct_count = ctx->new_count; |
| 12167 | size_t struct_alignment = ctx->struct_alignment; |
| 12168 | ctx->new_count = 1; |
| 12169 | ++ts; |
| 12170 | if (*ts != '{') { |
| 12171 | PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); |
| 12172 | return NULL; |
| 12173 | } |
| 12174 | if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; |
| 12175 | ctx->enc_type = 0; |
| 12176 | ctx->enc_count = 0; |
| 12177 | ctx->struct_alignment = 0; |
| 12178 | ++ts; |
no test coverage detected