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:
Victor Stinner 2011-03-20 01:50:21 +01:00
parent 9464d61cba
commit 53dc735168
3 changed files with 73 additions and 38 deletions

View file

@ -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