summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/module.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-03-04 12:57:07 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-03-04 12:57:07 (GMT)
commit0639b56672112e69a1d55c0105dae9198f757ec2 (patch)
treee98517568ca1ddb7932018f6f0c88a732ff1d2a7 /Doc/c-api/module.rst
parent3a9559b844153c4fe8584d129d88fa8f0a396944 (diff)
downloadcpython-0639b56672112e69a1d55c0105dae9198f757ec2.zip
cpython-0639b56672112e69a1d55c0105dae9198f757ec2.tar.gz
cpython-0639b56672112e69a1d55c0105dae9198f757ec2.tar.bz2
Issue #3080: Add PyModule_NewObject() function
Diffstat (limited to 'Doc/c-api/module.rst')
-rw-r--r--Doc/c-api/module.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst
index a31046c..b914068 100644
--- a/Doc/c-api/module.rst
+++ b/Doc/c-api/module.rst
@@ -29,7 +29,7 @@ There are only a few functions special to module objects.
:c:data:`PyModule_Type`.
-.. c:function:: PyObject* PyModule_New(const char *name)
+.. c:function:: PyObject* PyModule_NewObject(PyObject *name)
.. index::
single: __name__ (module attribute)
@@ -40,6 +40,14 @@ There are only a few functions special to module objects.
Only the module's :attr:`__doc__` and :attr:`__name__` attributes are filled in;
the caller is responsible for providing a :attr:`__file__` attribute.
+ .. versionadded:: 3.3
+
+
+.. c:function:: PyObject* PyModule_New(const char *name)
+
+ Similar to :c:func:`PyImport_NewObject`, but the name is an UTF-8 encoded
+ string instead of a Unicode object.
+
.. c:function:: PyObject* PyModule_GetDict(PyObject *module)