[Python-checkins] python/dist/src/Modules datetimemodule.c,1.17,1.18
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Thu, 26 Dec 2002 18:26:18 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv3794/python/Modules
Modified Files:
datetimemodule.c
Log Message:
And put back a little code duplication, in the form of asserts.
Index: datetimemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/datetimemodule.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** datetimemodule.c 27 Dec 2002 02:21:51 -0000 1.17
--- datetimemodule.c 27 Dec 2002 02:26:16 -0000 1.18
***************
*** 3169,3172 ****
--- 3169,3173 ----
other, &offset2, &n2) < 0)
return NULL;
+ assert(n1 != OFFSET_UNKNOWN && n2 != OFFSET_UNKNOWN);
/* If they're both naive, or both aware and have the same offsets,
* we get off cheap. Note that if they're both naive, offset1 ==
***************
*** 3682,3685 ****
--- 3683,3687 ----
other, &offset2, &n2) < 0)
return NULL;
+ assert(n1 != OFFSET_UNKNOWN && n2 != OFFSET_UNKNOWN);
/* If they're both naive, or both aware and have the same offsets,
* we get off cheap. Note that if they're both naive, offset1 ==
***************
*** 4620,4623 ****
--- 4622,4626 ----
right, &offset2, &n2) < 0)
return NULL;
+ assert(n1 != OFFSET_UNKNOWN && n2 != OFFSET_UNKNOWN);
if (n1 != n2) {
PyErr_SetString(PyExc_TypeError,