The Andrea's-bunch-o-fixes (2).

This commit is contained in:
Federico Di Gregorio 2005-01-29 04:19:39 +00:00
parent b742c48c67
commit bd5b76d0e4
2 changed files with 3 additions and 2 deletions

View File

@ -904,7 +904,8 @@ _psyco_curs_has_write_check(PyObject* o, void* var)
return 1;
}
else {
PyErr_SetString(TypeError, "argument 1 must have a .write() method");
PyErr_SetString(PyExc_TypeError,
"argument 1 must have a .write() method");
return 0;
}
}

View File

@ -538,7 +538,7 @@ _pq_fetch_tuples(cursorObject *curs)
/* 4,5/ scale and precision */
if (ftype == NUMERICOID) {
PyTuple_SET_ITEM(dtitem, 4, PyInt_FromLong((fmod >> 16) & 0xFFFF));
PyTuple_SET_ITEM(dtitem, 5, PyInt_FromLong(fmod & 0xFFFF) - 4);
PyTuple_SET_ITEM(dtitem, 5, PyInt_FromLong((fmod & 0xFFFF) - 4));
}
else {
Py_INCREF(Py_None);