Skip to content

Commit dcc3b60

Browse files
committed
add missing global
1 parent e46875e commit dcc3b60

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

graalpython/com.oracle.graal.python.cext/src/unicodeobject.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,3 +287,34 @@ Py_UNICODE* PyUnicode_AsUnicodeAndSize(PyObject *unicode, Py_ssize_t *size) {
287287
}
288288
return NULL;
289289
}
290+
291+
/* Fast detection of the most frequent whitespace characters */
292+
const unsigned char _Py_ascii_whitespace[] = {
293+
0, 0, 0, 0, 0, 0, 0, 0,
294+
/* case 0x0009: * CHARACTER TABULATION */
295+
/* case 0x000A: * LINE FEED */
296+
/* case 0x000B: * LINE TABULATION */
297+
/* case 0x000C: * FORM FEED */
298+
/* case 0x000D: * CARRIAGE RETURN */
299+
0, 1, 1, 1, 1, 1, 0, 0,
300+
0, 0, 0, 0, 0, 0, 0, 0,
301+
/* case 0x001C: * FILE SEPARATOR */
302+
/* case 0x001D: * GROUP SEPARATOR */
303+
/* case 0x001E: * RECORD SEPARATOR */
304+
/* case 0x001F: * UNIT SEPARATOR */
305+
0, 0, 0, 0, 1, 1, 1, 1,
306+
/* case 0x0020: * SPACE */
307+
1, 0, 0, 0, 0, 0, 0, 0,
308+
0, 0, 0, 0, 0, 0, 0, 0,
309+
0, 0, 0, 0, 0, 0, 0, 0,
310+
0, 0, 0, 0, 0, 0, 0, 0,
311+
312+
0, 0, 0, 0, 0, 0, 0, 0,
313+
0, 0, 0, 0, 0, 0, 0, 0,
314+
0, 0, 0, 0, 0, 0, 0, 0,
315+
0, 0, 0, 0, 0, 0, 0, 0,
316+
0, 0, 0, 0, 0, 0, 0, 0,
317+
0, 0, 0, 0, 0, 0, 0, 0,
318+
0, 0, 0, 0, 0, 0, 0, 0,
319+
0, 0, 0, 0, 0, 0, 0, 0
320+
};

0 commit comments

Comments
 (0)