summaryrefslogtreecommitdiff
path: root/Modules/getpath.c
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2015-04-13 14:21:02 -0400
committerBrett Cannon <brett@python.org>2015-04-13 14:21:02 -0400
commitf299abdafa0f2b6eb7abae274861b19b361c96bc (patch)
treeafc3a2bf560e30c7725510eda3b57d71ceddba00 /Modules/getpath.c
parenta63cc212348e276c8ede32773313c60ff7fda651 (diff)
downloadcpython-git-f299abdafa0f2b6eb7abae274861b19b361c96bc.tar.gz
Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r--Modules/getpath.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 429bef3489..03d292c18b 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -170,14 +170,14 @@ isfile(wchar_t *filename) /* Is file, not directory */
static int
-ismodule(wchar_t *filename) /* Is module -- check for .pyc/.pyo too */
+ismodule(wchar_t *filename) /* Is module -- check for .pyc too */
{
if (isfile(filename))
return 1;
/* Check for the compiled version of prefix. */
if (wcslen(filename) < MAXPATHLEN) {
- wcscat(filename, Py_OptimizeFlag ? L"o" : L"c");
+ wcscat(filename, L"c");
if (isfile(filename))
return 1;
}
@@ -891,4 +891,3 @@ Py_GetProgramFullPath(void)
#ifdef __cplusplus
}
#endif
-