From fae710dbfc3d3bcdc71aaef607ebd78f0b1a49d9 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Tue, 24 Feb 2015 14:53:52 +0900 Subject: [PATCH] Fix _mysql.escape_string() --- _mysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_mysql.c b/_mysql.c index 1e7b70a..a479b4b 100644 --- a/_mysql.c +++ b/_mysql.c @@ -1079,7 +1079,7 @@ _mysql_escape_string( PyObject *str; char *in, *out; int len, size; - if (!PyArg_ParseTuple(args, "y#:escape_string", &in, &size)) return NULL; + if (!PyArg_ParseTuple(args, "s#:escape_string", &in, &size)) return NULL; str = PyBytes_FromStringAndSize((char *) NULL, size*2+1); if (!str) return PyErr_NoMemory(); out = PyBytes_AS_STRING(str);