Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e3ad61

Browse files
committed
Extract WHITESPACE_CHARS constant
1 parent 2c6a6e5 commit 5e3ad61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cstring.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <Python.h>
22

3+
#define WHITESPACE_CHARS " \t\n\v\f\r"
34

45
/* memrchr not available on some systems, so reimplement. */
56
const char *_memrchr(const char *s, int c, size_t n) {
@@ -660,7 +661,7 @@ const char *_strip_chars_from_args(PyObject *args) {
660661
if(!PyArg_ParseTuple(args, "|O", &charsobj))
661662
return NULL;
662663

663-
const char *chars = " \t\n\v\f\r";
664+
const char *chars = WHITESPACE_CHARS;
664665

665666
if(charsobj && charsobj != Py_None) {
666667
if(!PyUnicode_Check(charsobj))

0 commit comments

Comments
 (0)