summaryrefslogtreecommitdiff
path: root/psycopg
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@initd.org>2005-01-29 04:19:39 +0000
committerFederico Di Gregorio <fog@initd.org>2005-01-29 04:19:39 +0000
commitbd5b76d0e41699ddaeb3c3b2ca6610600d311188 (patch)
tree44e635e68be9f0d374b183cd99e91f3dfdaf9fe1 /psycopg
parentb742c48c6711847ec58a5a6778c372e2ac61df6d (diff)
downloadpsycopg2-bd5b76d0e41699ddaeb3c3b2ca6610600d311188.tar.gz
The Andrea's-bunch-o-fixes (2).
Diffstat (limited to 'psycopg')
-rw-r--r--psycopg/cursor_type.c3
-rw-r--r--psycopg/pqpath.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c
index 0c48bbf..341f275 100644
--- a/psycopg/cursor_type.c
+++ b/psycopg/cursor_type.c
@@ -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;
}
}
diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c
index 54f9c4b..89e2e2b 100644
--- a/psycopg/pqpath.c
+++ b/psycopg/pqpath.c
@@ -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);