mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #3080: Add PyImport_ImportFrozenModuleObject()
find_frozen(), get_frozen_object(), is_frozen_package() and other functions related to frozen modules use Unicode strings instead of byte strings.
This commit is contained in:
parent
9464d61cba
commit
53dc735168
3 changed files with 73 additions and 38 deletions
|
@ -217,7 +217,7 @@ Importing Modules
|
|||
For internal use only.
|
||||
|
||||
|
||||
.. c:function:: int PyImport_ImportFrozenModule(char *name)
|
||||
.. c:function:: int PyImport_ImportFrozenModuleObject(PyObject *name)
|
||||
|
||||
Load a frozen module named *name*. Return ``1`` for success, ``0`` if the
|
||||
module is not found, and ``-1`` with an exception set if the initialization
|
||||
|
@ -225,6 +225,14 @@ Importing Modules
|
|||
:c:func:`PyImport_ImportModule`. (Note the misnomer --- this function would
|
||||
reload the module if it was already imported.)
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
.. c:function:: int PyImport_ImportFrozenModule(char *name)
|
||||
|
||||
Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is an
|
||||
UTF-8 encoded string instead of a Unicode object.
|
||||
|
||||
|
||||
.. c:type:: struct _frozen
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue