[Zope-Checkins] CVS: Products/DCOracle2/src - dco2.c:1.118
Matthew T. Kromer
matt@zope.com
Wed, 21 Aug 2002 11:31:12 -0400
Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv4400/src
Modified Files:
dco2.c
Log Message:
Make date conversion used unsigned char vs signed char (Collector #59)
=== Products/DCOracle2/src/dco2.c 1.117 => 1.118 ===
--- Products/DCOracle2/src/dco2.c:1.117 Fri Aug 16 10:20:26 2002
+++ Products/DCOracle2/src/dco2.c Wed Aug 21 11:31:11 2002
@@ -1198,6 +1198,9 @@
TYPEENTRY(SQLT_TIME_TZ), /* Time with zone */
TYPEENTRY(SQLT_TIMESTAMP), /* Time stamp */
TYPEENTRY(SQLT_TIMESTAMP_TZ), /* Time stamp with zone */
+#ifdef ORACLE9i
+ TYPEENTRY(SQLT_TIMESTAMP_LTZ), /* Time stamp localzone */
+#endif
TYPEENTRY(SQLT_INTERVAL_YM), /* Interval year - month*/
TYPEENTRY(SQLT_INTERVAL_DS), /* Interval day - second*/
#endif
@@ -3720,8 +3723,11 @@
self->batchsz = count;
- if ((list = Py_BuildValue("[]")) == NULL)
+ if ((list = Py_BuildValue("[]")) == NULL) {
+ TRACE(T_ERROR,("ss","Cursor_ResultSet",
+ "PyBuildValue returned NULL"));
return NULL;
+ }
for (i = 1; i <= PyList_Size(self->definition); i++) {
mode = OCI_DEFAULT;
@@ -3729,6 +3735,8 @@
== NULL) {
Py_DECREF(list);
+ TRACE(T_ERROR,("ss","Cursor_ResultSet",
+ "ResultSetAlloc returned NULL"));
return NULL;
}
@@ -6800,19 +6808,19 @@
CONVERTOUTF(SQLT_DAT) {
OracleDate *dateobject;
int t;
- char *c;
- char century;
- char year;
- char month;
- char day;
- char hour;
- char minute;
- char second;
+ unsigned char *c;
+ unsigned char century;
+ unsigned char year;
+ unsigned char month;
+ unsigned char day;
+ unsigned char hour;
+ unsigned char minute;
+ unsigned char second;
char buf[64];
TRACE(T_ENTRY,("sAd", "CONVERTOUTF(SQLT_DAT)", data, len));
- c = (char *) data;
+ c = (unsigned char *) data;
century = *c; c++;
year = *c; c++;