OILS / deps / typed_ast.patch View on Github | oilshell.org

32 lines, 28 significant
1From 123286721923ae8f3885dbfbad94d6ca940d5c96 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
3Date: Wed, 10 Nov 2021 19:15:50 +0100
4Subject: [PATCH] Define _PyUnicode_DecodeUnicodeEscape even on Python 3.6+
5 (#171)
6
7---
8 ast3/Python/ast.c | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/ast3/Python/ast.c b/ast3/Python/ast.c
12index cfca73f1..60b8fdd4 100644
13--- a/ast3/Python/ast.c
14+++ b/ast3/Python/ast.c
15@@ -56,6 +56,8 @@ _PyBytes_DecodeEscape(const char *s,
16 return PyBytes_DecodeEscape(s, len, errors, unicode, recode_encoding);
17 }
18
19+#endif
20+
21 PyObject *
22 _PyUnicode_DecodeUnicodeEscape(const char *s,
23 Py_ssize_t size,
24@@ -66,8 +68,6 @@ _PyUnicode_DecodeUnicodeEscape(const char *s,
25 return PyUnicode_DecodeUnicodeEscape(s, size, errors);
26 }
27
28-#endif
29-
30 static int validate_stmts(asdl_seq *);
31 static int validate_exprs(asdl_seq *, expr_context_ty, int);
32 static int validate_nonempty_seq(asdl_seq *, const char *, const char *);