@@ -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__ )
25222523extern PyTypeObject _PyBytesIOBuffer_Type ;
25232524
25242525static 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