diff Objects/bufferobject.c @ 13861:f3d5f71ccbb4 legacy-trunk

Removing warnings found by gcc -Wall
author Moshe Zadka <moshez@math.huji.ac.il>
date Fri, 04 Aug 2000 15:36:13 +0000
parents 0409a98cd582
children 6f6f965c5e2d
line wrap: on
line diff
--- a/Objects/bufferobject.c	Fri Aug 04 15:25:58 2000 +0000
+++ b/Objects/bufferobject.c	Fri Aug 04 15:36:13 2000 +0000
@@ -141,6 +141,7 @@
 PyObject *
 PyBuffer_New(int size)
 {
+	PyObject *o;
 	PyBufferObject * b;
 
 	if (size < 0) {
@@ -149,10 +150,10 @@
 		return NULL;
 	}
 	/* PyObject_New is inlined */
-	b = (PyBufferObject *) PyObject_MALLOC(sizeof(*b) + size);
-	if ( b == NULL )
+	o = PyObject_MALLOC(sizeof(*b) + size);
+	if ( o == NULL )
 		return PyErr_NoMemory();
-	PyObject_INIT((PyObject *)b, &PyBuffer_Type);
+	b = (PyBufferObject *) PyObject_INIT(o, &PyBuffer_Type);
 
 	b->b_base = NULL;
 	b->b_ptr = (void *)(b + 1);
@@ -162,7 +163,7 @@
 	b->b_hash = -1;
 #endif
 
-	return (PyObject *) b;
+	return o;
 }
 
 /* Methods */