[Python-checkins] python/dist/src/Modules datetimemodule.c,1.12,1.13

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2002年12月23日 08:17:42 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv16666/python/Modules
Modified Files:
	datetimemodule.c 
Log Message:
call_utc_tzinfo_method(): Got rid of the label and the gotos.
Index: datetimemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/datetimemodule.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** datetimemodule.c	22 Dec 2002 20:58:42 -0000	1.12
--- datetimemodule.c	23 Dec 2002 16:17:39 -0000	1.13
***************
*** 628,638 ****
 		return -1;
 
! 	if (u == Py_None) {
 		result = 0;
 		*none = 1;
- 		goto Done;
 	}
! 
! 	if (PyInt_Check(u))
 		result = PyInt_AS_LONG(u);
 
--- 628,636 ----
 		return -1;
 
! 	else if (u == Py_None) {
 		result = 0;
 		*none = 1;
 	}
! 	else if (PyInt_Check(u))
 		result = PyInt_AS_LONG(u);
 
***************
*** 656,660 ****
 					 name);
 				result = -1;
- 				goto Done;
 			}
 		}
--- 654,657 ----
***************
*** 665,672 ****
 			 "timedelta, not '%s'",
 			 name, u->ob_type->tp_name);
- 		goto Done;
 	}
 
- Done:
 	Py_DECREF(u);
 	if (result < -1439 || result > 1439) {
--- 662,667 ----

AltStyle によって変換されたページ (->オリジナル) /