Skip to content

Commit

Permalink
Fix for Python 3.10 windows build:
Browse files Browse the repository at this point in the history
Python 3.10 doesn't provide definition of
ssize_t on Windows platforms anymore.
  • Loading branch information
9EOR9 committed Oct 19, 2021
1 parent 5a3310a commit 3f1f3ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/mariadb_python.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

#if defined(_WIN32)
#include <windows.h>
#ifdef _MSC_VER
typedef SSIZE_T ssize_t;
#endif
typedef CRITICAL_SECTION pthread_mutex_t;
#define pthread_mutex_init(A,B) InitializeCriticalSection(A)
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
Expand Down

0 comments on commit 3f1f3ca

Please sign in to comment.