]> granicus.if.org Git - python/commitdiff
type_new(): cast PyObject_MALLOC's result to char*, for clarity.
authorTim Peters <tim.peters@gmail.com>
Thu, 4 Oct 2001 05:43:02 +0000 (05:43 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 4 Oct 2001 05:43:02 +0000 (05:43 +0000)
Objects/typeobject.c

index e8f436c770fd80fd0783abb81d1f3bf2a19c13d7..fae159c26e021ffe3ec2a3a8168e303d08f0b88f 100644 (file)
@@ -909,7 +909,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
                PyObject *doc = PyDict_GetItemString(dict, "__doc__");
                if (doc != NULL && PyString_Check(doc)) {
                        const size_t n = (size_t)PyString_GET_SIZE(doc);
-                       type->tp_doc = PyObject_MALLOC(n+1);
+                       type->tp_doc = (char *)PyObject_MALLOC(n+1);
                        if (type->tp_doc == NULL) {
                                Py_DECREF(type);
                                return NULL;