Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7559c0

Browse files
author
Stefan Krah
committed
Issue #14203: Temporary fix for the compile failure on Windows.
1 parent 650c1e8 commit a7559c0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Modules/_testcapimodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,6 +2519,7 @@ test_from_contiguous(PyObject* self, PyObject *noargs)
25192519
Py_RETURN_NONE;
25202520
}
25212521

2522+
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__GNUC__)
25222523
extern PyTypeObject _PyBytesIOBuffer_Type;
25232524

25242525
static PyObject *
@@ -2556,6 +2557,7 @@ test_pep3118_obsolete_write_locks(PyObject* self, PyObject *noargs)
25562557
"test_pep3118_obsolete_write_locks: failure");
25572558
return NULL;
25582559
}
2560+
#endif
25592561

25602562
/* This tests functions that historically supported write locks. It is
25612563
wrong to call getbuffer() with view==NULL and a compliant getbufferproc
@@ -3229,7 +3231,9 @@ static PyMethodDef TestMethods[] = {
32293231
{"test_unicode_compare_with_ascii", (PyCFunction)test_unicode_compare_with_ascii, METH_NOARGS},
32303232
{"test_capsule", (PyCFunction)test_capsule, METH_NOARGS},
32313233
{"test_from_contiguous", (PyCFunction)test_from_contiguous, METH_NOARGS},
3234+
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__GNUC__)
32323235
{"test_pep3118_obsolete_write_locks", (PyCFunction)test_pep3118_obsolete_write_locks, METH_NOARGS},
3236+
#endif
32333237
{"getbuffer_with_null_view", getbuffer_with_null_view, METH_O},
32343238
{"getargs_tuple", getargs_tuple, METH_VARARGS},
32353239
{"getargs_keywords", (PyCFunction)getargs_keywords,

0 commit comments

Comments
 (0)