Lines 41-47
int
Link Here
|
41 |
Pycairo_is_fspath (PyObject *obj) { |
41 |
Pycairo_is_fspath (PyObject *obj) { |
42 |
#if PY_MAJOR_VERSION < 3 |
42 |
#if PY_MAJOR_VERSION < 3 |
43 |
return (PyString_Check (obj) || PyUnicode_Check (obj)); |
43 |
return (PyString_Check (obj) || PyUnicode_Check (obj)); |
44 |
#elif PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 6 |
44 |
#elif PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 6 && !defined(PYPY_VERSION) |
|
|
45 |
/* PyOS_FSPath() is missing in PyPy: |
46 |
* https://bitbucket.org/pypy/pypy/issues/2961 */ |
45 |
PyObject *real = PyOS_FSPath (obj); |
47 |
PyObject *real = PyOS_FSPath (obj); |
46 |
if (real == NULL) { |
48 |
if (real == NULL) { |
47 |
PyErr_Clear (); |
49 |
PyErr_Clear (); |