[Python-checkins] r50779 - python/trunk/Objects/longobject.c

neal.norwitz python-checkins at python.org
Sun Jul 23 09:53:14 CEST 2006


Author: neal.norwitz
Date: Sun Jul 23 09:53:14 2006
New Revision: 50779

Modified:
   python/trunk/Objects/longobject.c
Log:
Move the initialization of size_a down below the check for a being NULL.

Reported by Klocwork #106


Modified: python/trunk/Objects/longobject.c
==============================================================================
--- python/trunk/Objects/longobject.c	(original)
+++ python/trunk/Objects/longobject.c	Sun Jul 23 09:53:14 2006
@@ -1203,7 +1203,7 @@
 	register PyLongObject *a = (PyLongObject *)aa;
 	PyStringObject *str;
 	Py_ssize_t i;
-	const Py_ssize_t size_a = ABS(a->ob_size);
+	Py_ssize_t size_a;
 	char *p;
 	int bits;
 	char sign = '\0';
@@ -1213,6 +1213,7 @@
 		return NULL;
 	}
 	assert(base >= 2 && base <= 36);
+	size_a = ABS(a->ob_size);
 
 	/* Compute a rough upper bound for the length of the string */
 	i = base;


More information about the Python-checkins mailing list