Skip to content

Commit 2b71e94

Browse files
committed
Move _Py_ascii_whitespace to unicodeobject.c
1 parent 0e6f07d commit 2b71e94

File tree

2 files changed

+2
-35
lines changed

2 files changed

+2
-35
lines changed

graalpython/com.oracle.graal.python.cext/src/const_arrays.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,41 +42,6 @@
4242
#ifndef SRC_CONST_ARRAYS_H_
4343
#define SRC_CONST_ARRAYS_H_
4444

45-
/******************************************************************************
46-
* imported from 'unicodeobject.c'
47-
******************************************************************************/
48-
49-
// partially taken from CPython "Objects/unicodeobject.c"
50-
const unsigned char _Py_ascii_whitespace[] = {
51-
0, 0, 0, 0, 0, 0, 0, 0,
52-
/* case 0x0009: * CHARACTER TABULATION */
53-
/* case 0x000A: * LINE FEED */
54-
/* case 0x000B: * LINE TABULATION */
55-
/* case 0x000C: * FORM FEED */
56-
/* case 0x000D: * CARRIAGE RETURN */
57-
0, 1, 1, 1, 1, 1, 0, 0,
58-
0, 0, 0, 0, 0, 0, 0, 0,
59-
/* case 0x001C: * FILE SEPARATOR */
60-
/* case 0x001D: * GROUP SEPARATOR */
61-
/* case 0x001E: * RECORD SEPARATOR */
62-
/* case 0x001F: * UNIT SEPARATOR */
63-
0, 0, 0, 0, 1, 1, 1, 1,
64-
/* case 0x0020: * SPACE */
65-
1, 0, 0, 0, 0, 0, 0, 0,
66-
0, 0, 0, 0, 0, 0, 0, 0,
67-
0, 0, 0, 0, 0, 0, 0, 0,
68-
0, 0, 0, 0, 0, 0, 0, 0,
69-
70-
0, 0, 0, 0, 0, 0, 0, 0,
71-
0, 0, 0, 0, 0, 0, 0, 0,
72-
0, 0, 0, 0, 0, 0, 0, 0,
73-
0, 0, 0, 0, 0, 0, 0, 0,
74-
0, 0, 0, 0, 0, 0, 0, 0,
75-
0, 0, 0, 0, 0, 0, 0, 0,
76-
0, 0, 0, 0, 0, 0, 0, 0,
77-
0, 0, 0, 0, 0, 0, 0, 0
78-
};
79-
8045
/******************************************************************************
8146
* imported from 'pyctype.c'
8247
******************************************************************************/

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ unicode_fill(enum PyUnicode_Kind kind, void *data, Py_UCS4 value,
312312
default: Py_UNREACHABLE();
313313
}
314314
}
315+
#endif // GraalPy change
315316

316317

317318
/* Fast detection of the most frequent whitespace characters */
@@ -345,6 +346,7 @@ const unsigned char _Py_ascii_whitespace[] = {
345346
0, 0, 0, 0, 0, 0, 0, 0
346347
};
347348

349+
#if 0 // GraalPy change
348350
/* forward */
349351
static PyUnicodeObject *_PyUnicode_New(Py_ssize_t length);
350352
static PyObject* get_latin1_char(unsigned char ch);

0 commit comments

Comments
 (0)