diff --git a/gen_wrap.py b/gen_wrap.py index fce2083645ea9ccc97454f0cd3485ecf236f3be7..2b1de152f1c167fea3975e7a3ebfe8fc146bb689 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -995,14 +995,11 @@ def gen_callback_wrapper(gen, cb, func_name, has_userptr): failure_return = "ffi.NULL" ret_py_cls = isl_class_to_py_class(cb.return_base_type) - ret_cls = cb.return_base_type[4:] if cb.return_semantics is None: raise SignatureNotSupported("callback return with unspecified semantics") elif cb.return_semantics is not SEM_GIVE: raise SignatureNotSupported("callback return with non-GIVE semantics") - if ret_cls in NON_COPYABLE: - raise SignatureNotSupported("noncopyable callback return") post_call(""" if _result is None: @@ -1091,7 +1088,7 @@ def write_method_wrapper(gen, cls_name, meth): cb_wrapper_name=cb_wrapper_name )) - if (meth.cls == "ast_build" + if (meth.cls in ["ast_build", "ast_print_options"] and meth.name.startswith("set_")): # These callbacks need to outlive the set call. # Store them on the instance. diff --git a/test/test_isl.py b/test/test_isl.py index fb3ce73b6abd47b1bf9675d643f0bb2bd8ccfc49..851d79b41152d98011897fb3fea480060674e642 100644 --- a/test/test_isl.py +++ b/test/test_isl.py @@ -23,7 +23,7 @@ THE SOFTWARE. """ import islpy as isl -import pytest +import pytest # noqa def test_basics():