aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/zope.interface/py3/zope/interface/_zope_interface_coptimizations.c
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-03-05 08:51:15 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-03-05 09:00:32 +0300
commit18c72bb588bd1bf332582b98058548f02e183e5d (patch)
tree21d752e5113b9d58276698044f3c53a6e3a636b5 /contrib/python/zope.interface/py3/zope/interface/_zope_interface_coptimizations.c
parent74819c4157bd388a7d429c870ea4b343a282dafa (diff)
downloadydb-18c72bb588bd1bf332582b98058548f02e183e5d.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/zope.interface/py3/zope/interface/_zope_interface_coptimizations.c')
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/_zope_interface_coptimizations.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/contrib/python/zope.interface/py3/zope/interface/_zope_interface_coptimizations.c b/contrib/python/zope.interface/py3/zope/interface/_zope_interface_coptimizations.c
index 91899283c0..2cf453a7e6 100644
--- a/contrib/python/zope.interface/py3/zope/interface/_zope_interface_coptimizations.c
+++ b/contrib/python/zope.interface/py3/zope/interface/_zope_interface_coptimizations.c
@@ -1977,7 +1977,6 @@ static struct PyMethodDef m_methods[] = {
{NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
};
-#if PY_MAJOR_VERSION >= 3
static char module_doc[] = "C optimizations for zope.interface\n\n";
static struct PyModuleDef _zic_module = {
@@ -1991,20 +1990,14 @@ static struct PyModuleDef _zic_module = {
NULL,
NULL
};
-#endif
static PyObject *
init(void)
{
PyObject *m;
-#if PY_MAJOR_VERSION < 3
-#define DEFINE_STRING(S) \
- if(! (str ## S = PyString_FromString(# S))) return NULL
-#else
#define DEFINE_STRING(S) \
if(! (str ## S = PyUnicode_FromString(# S))) return NULL
-#endif
DEFINE_STRING(__dict__);
DEFINE_STRING(__implemented__);
@@ -2054,13 +2047,7 @@ init(void)
if (PyType_Ready(&VerifyingBase) < 0)
return NULL;
- #if PY_MAJOR_VERSION < 3
- /* Create the module and add the functions */
- m = Py_InitModule3("_zope_interface_coptimizations", m_methods,
- "C optimizations for zope.interface\n\n");
- #else
m = PyModule_Create(&_zic_module);
- #endif
if (m == NULL)
return NULL;
@@ -2084,17 +2071,10 @@ init(void)
}
PyMODINIT_FUNC
-#if PY_MAJOR_VERSION < 3
-init_zope_interface_coptimizations(void)
-{
- init();
-}
-#else
PyInit__zope_interface_coptimizations(void)
{
return init();
}
-#endif
#ifdef __clang__
#pragma clang diagnostic pop