[Python-checkins] r45545 - python/trunk/Modules/datetimemodule.c (original) (raw)

skip.montanaro python-checkins at python.org
Tue Apr 18 21:35:05 CEST 2006


Author: skip.montanaro Date: Tue Apr 18 21:35:04 2006 New Revision: 45545

Modified: python/trunk/Modules/datetimemodule.c Log: C++ compiler cleanup: "typename" is a C++ keyword

Modified: python/trunk/Modules/datetimemodule.c

--- python/trunk/Modules/datetimemodule.c (original) +++ python/trunk/Modules/datetimemodule.c Tue Apr 18 21:35:04 2006 @@ -2411,11 +2411,11 @@ date_repr(PyDateTime_Date *self) { char buffer[1028]; - const char *typename; + const char *type_name;

@@ -3138,7 +3138,7 @@ time_repr(PyDateTime_Time *self) { char buffer[100]; - const char *typename = self->ob_type->tp_name; + const char *type_name = self->ob_type->tp_name; int h = TIME_GET_HOUR(self); int m = TIME_GET_MINUTE(self); int s = TIME_GET_SECOND(self); @@ -3147,13 +3147,13 @@

 if (us)
     PyOS_snprintf(buffer, sizeof(buffer),

@@ -4036,13 +4036,13 @@ datetime_repr(PyDateTime_DateTime *self) { char buffer[1000]; - const char *typename = self->ob_type->tp_name; + const char *type_name = self->ob_type->tp_name; PyObject *baserepr;

 if (DATE_GET_MICROSECOND(self)) {
     PyOS_snprintf(buffer, sizeof(buffer),
               "%s(%d, %d, %d, %d, %d, %d, %d)",

@@ -4051,7 +4051,7 @@ else if (DATE_GET_SECOND(self)) { PyOS_snprintf(buffer, sizeof(buffer), "%s(%d, %d, %d, %d, %d, %d)", - typename, + type_name, GET_YEAR(self), GET_MONTH(self), GET_DAY(self), DATE_GET_HOUR(self), DATE_GET_MINUTE(self), DATE_GET_SECOND(self)); @@ -4059,7 +4059,7 @@ else { PyOS_snprintf(buffer, sizeof(buffer), "%s(%d, %d, %d, %d, %d)", - typename, + type_name, GET_YEAR(self), GET_MONTH(self), GET_DAY(self), DATE_GET_HOUR(self), DATE_GET_MINUTE(self)); }



More information about the Python-checkins mailing list