]> granicus.if.org Git - python/commitdiff
bpo-31443: Update included code. (#3697)
authorStefan Krah <skrah@bytereef.org>
Fri, 22 Sep 2017 16:14:13 +0000 (18:14 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Sep 2017 16:14:13 +0000 (18:14 +0200)
Doc/includes/noddy.c

index 19a27a89e883b3b8045536b5dfab5ae5e2e12b22..07b5d5a9b83ce08dacc3aca57ab86ff6139b028e 100644 (file)
@@ -27,6 +27,23 @@ static PyTypeObject noddy_NoddyType = {
     0,                         /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT,        /* tp_flags */
     "Noddy objects",           /* tp_doc */
+    0,                         /* tp_traverse */
+    0,                         /* tp_clear */
+    0,                         /* tp_richcompare */
+    0,                         /* tp_weaklistoffset */
+    0,                         /* tp_iter */
+    0,                         /* tp_iternext */
+    0,                         /* tp_methods */
+    0,                         /* tp_members */
+    0,                         /* tp_getset */
+    0,                         /* tp_base */
+    0,                         /* tp_dict */
+    0,                         /* tp_descr_get */
+    0,                         /* tp_descr_set */
+    0,                         /* tp_dictoffset */
+    0,                         /* tp_init */
+    0,                         /* tp_alloc */
+    PyType_GenericNew,         /* tp_new */
 };
 
 static PyModuleDef noddymodule = {
@@ -42,7 +59,6 @@ PyInit_noddy(void)
 {
     PyObject* m;
 
-    noddy_NoddyType.tp_new = PyType_GenericNew;
     if (PyType_Ready(&noddy_NoddyType) < 0)
         return NULL;