We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1a4591 commit c3dbb4bCopy full SHA for c3dbb4b
1 file changed
Doc/c-api/module.rst
@@ -651,7 +651,13 @@ state:
651
652
.. c:macro:: PyModule_AddStringMacro(module, macro)
653
654
- Add a string constant to *module*.
+ Add a string constant to *module*. The name and the value are taken from
655
+ *macro*. For example ``PyModule_AddStrMacro(module, STRINGLIB_TYPE_NAME)``
656
+ adds the string constant *STRINGLIB_TYPE_NAME* with the value of
657
+ *STRINGLIB_TYPE_NAME* to *module*. The string *value* must be
658
+ ``NULL``-terminated and UTF-8 encoded.
659
+ Return ``-1`` with an exception set on error, ``0`` on success.
660
+
661
662
.. c:function:: int PyModule_AddType(PyObject *module, PyTypeObject *type)
663
0 commit comments