mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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.
This commit is contained in:
parent
a63cc21234
commit
f299abdafa
56 changed files with 4731 additions and 4621 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue