summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-04-02 21:11:38 (GMT)
committerGitHub <noreply@github.com>2022-04-02 21:11:38 (GMT)
commit3df0e63aabef905b72fad78256f24b9270c63172 (patch)
treeb3bc508d8a48dc0f491c2165cc91f5d30db54e82
parentc93a0ac6972221787d8bea1c41a9feb667ed3d2c (diff)
downloadcpython-3df0e63aabef905b72fad78256f24b9270c63172.zip
cpython-3df0e63aabef905b72fad78256f24b9270c63172.tar.gz
cpython-3df0e63aabef905b72fad78256f24b9270c63172.tar.bz2
bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266)
-rw-r--r--Parser/tokenizer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 13116d0..db84e2e 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -2072,7 +2072,7 @@ _PyTokenizer_Get(struct tok_state *tok,
return result;
}
-#if defined(__wasi__) || defined(__EMSCRIPTEN__)
+#if defined(__wasi__) || (defined(__EMSCRIPTEN__) && (__EMSCRIPTEN_major__ >= 3))
// fdopen() with borrowed fd. WASI does not provide dup() and Emscripten's
// dup() emulation with open() is slow.
typedef union {