Issue #15242: Have PyImport_GetMagicTag() return a const char *

defined in sysmodule.c instead of straight out of a Unicode object.

Thanks to Amaury Forgeot d'Arc for noticing the bug and Eric Snow for
writing the patch.
This commit is contained in:
Brett Cannon 2012-07-09 14:22:12 -04:00
parent 903c27c177
commit 3adc7b75a5
3 changed files with 24 additions and 29 deletions

View file

@ -178,7 +178,8 @@ Importing Modules
.. c:function:: const char * PyImport_GetMagicTag()
Return the magic tag string for :pep:`3147` format Python bytecode file
names.
names. Keep in mind that the value at ``sys.implementation.cache_tag`` is
authoritative and should be used instead of this function.
.. versionadded:: 3.2