summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2006-04-11 06:54:30 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2006-04-11 06:54:30 (GMT)
commit377be11ee1fab015f4cc77975374f86cf436536e (patch)
tree3181b8a7ebd32101aa56048eaa2f96a98b8bf013 /Objects/floatobject.c
parentbbfe4fad361e7190675f28702332ddc377bd8cfd (diff)
downloadcpython-377be11ee1fab015f4cc77975374f86cf436536e.zip
cpython-377be11ee1fab015f4cc77975374f86cf436536e.tar.gz
cpython-377be11ee1fab015f4cc77975374f86cf436536e.tar.bz2
More C++-compliance. Note especially listobject.c - to get C++ to accept the
PyTypeObject structures, I had to make prototypes for the functions, and move the structure definition ahead of the functions. I'd dearly like a better way to do this - to change this would make for a massive set of changes to the codebase. There's still some warnings - this is purely to get rid of errors first.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 64a5122..5ec8a0e 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -959,21 +959,21 @@ float_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *
float_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
- PyObject *tmp, *new;
+ PyObject *tmp, *newobj;
assert(PyType_IsSubtype(type, &PyFloat_Type));
tmp = float_new(&PyFloat_Type, args, kwds);
if (tmp == NULL)
return NULL;
assert(PyFloat_CheckExact(tmp));
- new = type->tp_alloc(type, 0);
- if (new == NULL) {
+ newobj = type->tp_alloc(type, 0);
+ if (newobj == NULL) {
Py_DECREF(tmp);
return NULL;
}
- ((PyFloatObject *)new)->ob_fval = ((PyFloatObject *)tmp)->ob_fval;
+ ((PyFloatObject *)newobj)->ob_fval = ((PyFloatObject *)tmp)->ob_fval;
Py_DECREF(tmp);
- return new;
+ return newobj;
}
static PyObject *