summaryrefslogtreecommitdiff
path: root/psycopg/microprotocols.c
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-31 18:55:33 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-31 18:55:33 +0100
commit30921b58a8a3fb89f14f5db3b9a724fbe2f46efa (patch)
tree204e4bb7cd67decadb69c745d702811f31209c27 /psycopg/microprotocols.c
parentb5a8facb9cc54990b5248b3fae1b1eaa14090e11 (diff)
downloadpsycopg2-30921b58a8a3fb89f14f5db3b9a724fbe2f46efa.tar.gz
Dropped conversion from None to NULL in adapter.
It was an error as the string is not conform to the protocol. The error is masked by the None fast path in _mogrify, but surfaces when adapting a tuple contains a None.
Diffstat (limited to 'psycopg/microprotocols.c')
-rw-r--r--psycopg/microprotocols.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/psycopg/microprotocols.c b/psycopg/microprotocols.c
index 12ec7fb..a00f20d 100644
--- a/psycopg/microprotocols.c
+++ b/psycopg/microprotocols.c
@@ -135,11 +135,6 @@ microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
/* we don't check for exact type conformance as specified in PEP 246
because the ISQLQuote type is abstract and there is no way to get a
quotable object to be its instance */
-
- /* None is always adapted to NULL */
-
- if (obj == Py_None)
- return PyString_FromString("NULL");
Dprintf("microprotocols_adapt: trying to adapt %s", obj->ob_type->tp_name);