diff options
| author | Federico Di Gregorio <fog@initd.org> | 2005-01-29 04:19:39 +0000 |
|---|---|---|
| committer | Federico Di Gregorio <fog@initd.org> | 2005-01-29 04:19:39 +0000 |
| commit | bd5b76d0e41699ddaeb3c3b2ca6610600d311188 (patch) | |
| tree | 44e635e68be9f0d374b183cd99e91f3dfdaf9fe1 /psycopg | |
| parent | b742c48c6711847ec58a5a6778c372e2ac61df6d (diff) | |
| download | psycopg2-bd5b76d0e41699ddaeb3c3b2ca6610600d311188.tar.gz | |
The Andrea's-bunch-o-fixes (2).
Diffstat (limited to 'psycopg')
| -rw-r--r-- | psycopg/cursor_type.c | 3 | ||||
| -rw-r--r-- | psycopg/pqpath.c | 2 |
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); |
