summaryrefslogtreecommitdiff
path: root/Objects/longobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 49f5c3b625..2d3dce67e4 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1476,7 +1476,7 @@ PyObject *
PyLong_FromUnicode(Py_UNICODE *u, Py_ssize_t length, int base)
{
PyObject *result;
- char *buffer = PyMem_MALLOC(length+1);
+ char *buffer = (char *)PyMem_MALLOC(length+1);
if (buffer == NULL)
return NULL;
@@ -3088,7 +3088,7 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *
long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
- PyLongObject *tmp, *new;
+ PyLongObject *tmp, *newobj;
Py_ssize_t i, n;
assert(PyType_IsSubtype(type, &PyLong_Type));
@@ -3099,17 +3099,17 @@ long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
n = tmp->ob_size;
if (n < 0)
n = -n;
- new = (PyLongObject *)type->tp_alloc(type, n);
- if (new == NULL) {
+ newobj = (PyLongObject *)type->tp_alloc(type, n);
+ if (newobj == NULL) {
Py_DECREF(tmp);
return NULL;
}
- assert(PyLong_Check(new));
- new->ob_size = tmp->ob_size;
+ assert(PyLong_Check(newobj));
+ newobj->ob_size = tmp->ob_size;
for (i = 0; i < n; i++)
- new->ob_digit[i] = tmp->ob_digit[i];
+ newobj->ob_digit[i] = tmp->ob_digit[i];
Py_DECREF(tmp);
- return (PyObject *)new;
+ return (PyObject *)newobj;
}
static PyObject *