summaryrefslogtreecommitdiff
path: root/src/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/module.c')
-rw-r--r--src/module.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c
index 2331168..2f40e98 100644
--- a/src/module.c
+++ b/src/module.c
@@ -28,6 +28,7 @@ PYCURL_INTERNAL char *g_pycurl_useragent = NULL;
/* Type objects */
PYCURL_INTERNAL PyObject *ErrorObject = NULL;
PYCURL_INTERNAL PyTypeObject *p_Curl_Type = NULL;
+PYCURL_INTERNAL PyTypeObject *p_CurlSlist_Type = NULL;
PYCURL_INTERNAL PyTypeObject *p_CurlMulti_Type = NULL;
PYCURL_INTERNAL PyTypeObject *p_CurlShare_Type = NULL;
#ifdef HAVE_CURL_7_19_6_OPTS
@@ -416,9 +417,11 @@ initpycurl(void)
/* Initialize the type of the new type objects here; doing it here
* is required for portability to Windows without requiring C++. */
p_Curl_Type = &Curl_Type;
+ p_CurlSlist_Type = &CurlSlist_Type;
p_CurlMulti_Type = &CurlMulti_Type;
p_CurlShare_Type = &CurlShare_Type;
Py_SET_TYPE(&Curl_Type, &PyType_Type);
+ Py_SET_TYPE(&CurlSlist_Type, &PyType_Type);
Py_SET_TYPE(&CurlMulti_Type, &PyType_Type);
Py_SET_TYPE(&CurlShare_Type, &PyType_Type);
@@ -426,12 +429,16 @@ initpycurl(void)
if (PyType_Ready(&Curl_Type) < 0)
goto error;
+ if (PyType_Ready(&CurlSlist_Type) < 0)
+ goto error;
+
if (PyType_Ready(&CurlMulti_Type) < 0)
goto error;
if (PyType_Ready(&CurlShare_Type) < 0)
goto error;
+
#if PY_MAJOR_VERSION >= 3
m = PyModule_Create(&curlmodule);
if (m == NULL)