Commit 2e8e290f authored by Armin Rigo's avatar Armin Rigo

hg merge default

--HG--
branch : release-1.14
......@@ -6268,6 +6268,17 @@ static PyObject *prepare_callback_info_tuple(CTypeDescrObject *ct,
return infotuple;
}
/* messily try to silence a gcc/clang deprecation warning for
ffi_prep_closure. Don't miss the "pragma pop" after the function.
This is done around the whole function because very old GCCs don't
support it inside a function. */
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
static PyObject *b_callback(PyObject *self, PyObject *args)
{
CTypeDescrObject *ct;
......@@ -6336,21 +6347,8 @@ static PyObject *b_callback(PyObject *self, PyObject *args)
PyErr_Format(PyExc_SystemError, "ffi_prep_closure_loc() is missing");
goto error;
#else
/* messily try to silence a gcc/clang deprecation warning here */
# if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# elif defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
# endif
status = ffi_prep_closure(closure, &cif_descr->cif,
invoke_callback, infotuple);
# if defined(__clang__)
# pragma clang diagnostic pop
# elif defined(__GNUC__)
# pragma GCC diagnostic pop
# endif
#endif
}
......@@ -6393,6 +6391,11 @@ static PyObject *b_callback(PyObject *self, PyObject *args)
Py_XDECREF(infotuple);
return NULL;
}
#if defined(__clang__)
# pragma clang diagnostic pop
#elif defined(__GNUC__)
# pragma GCC diagnostic pop
#endif
static PyObject *b_new_enum_type(PyObject *self, PyObject *args)
{
......
......@@ -8,6 +8,7 @@ from setup import library_dirs, extra_compile_args, extra_link_args
if __name__ == '__main__':
from distutils.core import setup
from distutils.extension import Extension
standard = '__pypy__' not in sys.builtin_module_names
setup(packages=['cffi'],
requires=['pycparser'],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment