[Python-checkins] bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266)

tiran webhook-mailer at python.org
Sat Apr 2 17:11:47 EDT 2022


https://github.com/python/cpython/commit/3df0e63aabef905b72fad78256f24b9270c63172
commit: 3df0e63aabef905b72fad78256f24b9270c63172
branch: main
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2022年04月02日T23:11:38+02:00
summary:
bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266)
files:
M Parser/tokenizer.c
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 13116d052ea59..db84e2e92e167 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 {


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /