@@ -96,7 +95,6 @@ int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObjec
char*string;
Py_ssize_tbuflen;
parameter_typeparamtype;
char*c;
if(parameter==Py_None){
rc=sqlite3_bind_null(self->st,pos);
...
...
@@ -114,24 +112,13 @@ int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObjec
}elseif(PyFloat_Check(parameter)){
paramtype=TYPE_FLOAT;
}elseif(PyUnicode_Check(parameter)){
paramtype=TYPE_STRING;
paramtype=TYPE_UNICODE;
}elseif(PyObject_CheckBuffer(parameter)){
paramtype=TYPE_BUFFER;
}else{
paramtype=TYPE_UNKNOWN;
}
if(paramtype==TYPE_STRING&&!allow_8bit_chars){
string=PyBytes_AS_STRING(parameter);
for(c=string;*c!=0;c++){
if(*c&0x80){
PyErr_SetString(pysqlite_ProgrammingError,"You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.");
rc=-1;
gotofinal;
}
}
}
switch(paramtype){
caseTYPE_LONG:
/* in the overflow error case, longval/longlongval is -1, and an exception is set */