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.
This commit is contained in:
Daniele Varrazzo 2010-12-31 18:55:33 +01:00
parent b5a8facb9c
commit 30921b58a8

View File

@ -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);