Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a2ebbd2

Browse filesBrowse files
committed
Use _Bool only for MySQL 8
1 parent 1ea5d01 commit a2ebbd2
Copy full SHA for a2ebbd2

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎_mysql.c

Copy file name to clipboardExpand all lines: _mysql.c
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ PERFORMANCE OF THIS SOFTWARE.
2929
#include "mysql.h"
3030
#include "mysqld_error.h"
3131

32+
#if MYSQL_VERSION_ID >= 80000
33+
// https://github.com/mysql/mysql-server/commit/eb821c023cedc029ca0b06456dfae365106bee84
34+
#define my_bool _Bool
35+
#endif
36+
3237
#include "Python.h"
3338
#if PY_MAJOR_VERSION >= 3
3439
#define IS_PY3K
@@ -1879,7 +1884,7 @@ _mysql_ConnectionObject_ping(
18791884
if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
18801885
check_connection(self);
18811886
if (reconnect != -1) {
1882-
char recon = (char)reconnect;
1887+
my_bool recon = (my_bool)reconnect;
18831888
mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);
18841889
}
18851890
Py_BEGIN_ALLOW_THREADS

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.