[Python-checkins] CVS: python/dist/src/Objects complexobject.c,2.50,2.51

Guido van Rossum gvanrossum@users.sourceforge.net
Thu, 25 Oct 2001 11:07:24 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv8895

Modified Files:
	complexobject.c 
Log Message:
complex_subtype_from_string(): move the declaration of s_buffer[] out
of the if block where it was before.  The name is only used inside
that if block, but the storage is referenced outside it via the 's'
variable.

(This patch was part of SF patch #474590 -- RISC OS support.)


Index: complexobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v
retrieving revision 2.50
retrieving revision 2.51
diff -C2 -d -r2.50 -r2.51
*** complexobject.c	2001/10/05 20:51:38	2.50
--- complexobject.c	2001/10/25 18:07:22	2.51
***************
*** 647,650 ****
--- 647,653 ----
  	int sign;
  	char buffer[256]; /* For errors */
+ #ifdef Py_USING_UNICODE
+ 	char s_buffer[256];
+ #endif
  	int len;
  
***************
*** 655,659 ****
  #ifdef Py_USING_UNICODE
  	else if (PyUnicode_Check(v)) {
- 	    	char s_buffer[256];
  		if (PyUnicode_GET_SIZE(v) >= sizeof(s_buffer)) {
  			PyErr_SetString(PyExc_ValueError,
--- 658,661 ----