diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/import.rst | 5 | ||||
-rw-r--r-- | Doc/whatsnew/3.3.rst | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst index 1f6b1e8..2d0d1b5 100644 --- a/Doc/c-api/import.rst +++ b/Doc/c-api/import.rst @@ -172,7 +172,10 @@ Importing Modules Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` and :file:`.pyo` files). The magic number should be present in the first four bytes - of the bytecode file, in little-endian byte order. + of the bytecode file, in little-endian byte order. Returns -1 on error. + + .. versionchanged:: 3.3 + Return value of -1 upon failure. .. c:function:: const char * PyImport_GetMagicTag() diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index e2deb9a..fd4a726 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -1761,6 +1761,9 @@ Porting C code :c:func:`PyUnicode_FromFormat()`, your code will automatically take advantage of the new unicode representations. +* :c:func:`PyImport_GetMagicNumber` now returns -1 upon failure. + + Building C extensions --------------------- |