Mercurial > p > mysql-python > mysqldb-2
diff _mysql.c @ 4:b5a377255eea MySQLdb
Merge changes from MySQLdb-1.2 branch (448-455)
author | adustman |
---|---|
date | Tue, 24 Oct 2006 19:52:31 +0000 |
parents | c0d1fc0429ce |
children | b70cce9bd065 |
line wrap: on
line diff
--- a/_mysql.c Sun Apr 09 04:06:40 2006 +0000 +++ b/_mysql.c Tue Oct 24 19:52:31 2006 +0000 @@ -77,9 +77,15 @@ #ifdef ER_NO_REFERENCED_ROW case ER_NO_REFERENCED_ROW: #endif +#ifdef ER_NO_REFERENCED_ROW_2 + case ER_NO_REFERENCED_ROW_2: +#endif #ifdef ER_ROW_IS_REFERENCED case ER_ROW_IS_REFERENCED: #endif +#ifdef ER_ROW_IS_REFERENCED_2 + case ER_ROW_IS_REFERENCED_2: +#endif #ifdef ER_CANNOT_ADD_FOREIGN case ER_CANNOT_ADD_FOREIGN: #endif @@ -480,6 +486,9 @@ return e; } +#define QUOTE(X) _QUOTE(X) +#define _QUOTE(X) #X + static char _mysql___doc__[] = "an adaptation of the MySQL C API (mostly)\n\ \n\ @@ -514,11 +523,11 @@ if (!(dict = PyModule_GetDict(module))) goto error; if (PyDict_SetItemString(dict, "version_info", - PyRun_String(version_info, Py_eval_input, + PyRun_String(QUOTE(version_info), Py_eval_input, dict, dict))) goto error; if (PyDict_SetItemString(dict, "__version__", - PyString_FromString(__version__))) + PyString_FromString(QUOTE(__version__)))) goto error; if (PyDict_SetItemString(dict, "connection", (PyObject *)&_mysql_ConnectionObject_Type))