summaryrefslogtreecommitdiffstats
path: root/Lib/ctypes
diff options
context:
space:
mode:
authorMalcolm Smith <smith@chaquo.com>2024-03-11 19:25:39 (GMT)
committerGitHub <noreply@github.com>2024-03-11 19:25:39 (GMT)
commit872c0714fcdc168ce4a69bdd0346f2d5dd488ec2 (patch)
tree84934c17e5561cc36d337d83b436fcc5bb40fd88 /Lib/ctypes
parent9f983e00ec55b87a098a4c8229fe5bb9acb9f3ac (diff)
downloadcpython-872c0714fcdc168ce4a69bdd0346f2d5dd488ec2.zip
cpython-872c0714fcdc168ce4a69bdd0346f2d5dd488ec2.tar.gz
cpython-872c0714fcdc168ce4a69bdd0346f2d5dd488ec2.tar.bz2
gh-71052: Change Android's `sys.platform` from "linux" to "android"
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Lib/ctypes')
-rw-r--r--Lib/ctypes/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index d54ee05..f63e31a 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -468,7 +468,7 @@ pydll = LibraryLoader(PyDLL)
if _os.name == "nt":
pythonapi = PyDLL("python dll", None, _sys.dllhandle)
-elif hasattr(_sys, "getandroidapilevel"):
+elif _sys.platform == "android":
pythonapi = PyDLL("libpython%d.%d.so" % _sys.version_info[:2])
elif _sys.platform == "cygwin":
pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2])