summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-03-22 16:17:34 (GMT)
committerGitHub <noreply@github.com>2020-03-22 16:17:34 (GMT)
commit05e4a296ecc127641160a04f39cc02c0f66a8c27 (patch)
tree59e73090785087a5e15175c815a20986e59a5728 /Include
parentb33e52511a59c6da7132c226b7f7489b092a33eb (diff)
downloadcpython-05e4a296ecc127641160a04f39cc02c0f66a8c27.zip
cpython-05e4a296ecc127641160a04f39cc02c0f66a8c27.tar.gz
cpython-05e4a296ecc127641160a04f39cc02c0f66a8c27.tar.bz2
bpo-40024: Add PyModule_AddType() helper function (GH-19088)
Diffstat (limited to 'Include')
-rw-r--r--Include/modsupport.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h
index f2dc812..4c4aab6 100644
--- a/Include/modsupport.h
+++ b/Include/modsupport.h
@@ -139,6 +139,10 @@ void _PyArg_Fini(void);
PyAPI_FUNC(int) PyModule_AddObject(PyObject *, const char *, PyObject *);
PyAPI_FUNC(int) PyModule_AddIntConstant(PyObject *, const char *, long);
PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, const char *, const char *);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000
+/* New in 3.9 */
+PyAPI_FUNC(int) PyModule_AddType(PyObject *module, PyTypeObject *type);
+#endif /* Py_LIMITED_API */
#define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
#define PyModule_AddStringMacro(m, c) PyModule_AddStringConstant(m, #c, c)