diff --git a/doc/conf.py b/doc/conf.py index e3c4c577f4ab54f3960aa698a09a0b18d398b15d..4f5281e3144a7caaf70d4154f1672fbafc22a809 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -41,7 +41,7 @@ master_doc = 'index' # General information about the project. project = u'islpy' -copyright = u'2011, Andreas Kloeckner' +copyright = u'2011-15, Andreas Kloeckner' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/doc/reference.rst b/doc/reference.rst index 1a5261e88592322b78c33270f62fd3384a8af4b7..03545579f45f52343cd716851cf58b6489579bd8 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -85,10 +85,6 @@ Error Reporting Symbolic Constants ^^^^^^^^^^^^^^^^^^ -.. autoclass:: format - :members: - :undoc-members: - .. autoclass:: error :members: :undoc-members: @@ -104,10 +100,6 @@ Symbolic Constants :undoc-members: :exclude-members: names, values -.. autoclass:: constants - :members: - :undoc-members: - .. autoclass:: ast_op_type :members: :undoc-members: diff --git a/gen_wrap.py b/gen_wrap.py index c4e0fb9f484ccdcdcb876493a6f59a43cf5b7530..16f471724d715245789559936cc6b121d1984d5b 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -294,8 +294,6 @@ typedef isl_restriction *(*isl_access_restrict)( """ PY_PREAMBLE = """ -from __future__ import print_function - import six @@ -927,9 +925,9 @@ def gen_callback_wrapper(gen, cb, func_name, has_userptr): py_cls=isl_class_to_py_class(arg.base_type))) if arg.semantics is SEM_TAKE: - pass - elif arg.semantics is SEM_KEEP: post_call("_py_{name}._release()".format(name=arg.name)) + elif arg.semantics is SEM_KEEP: + pass else: raise SignatureNotSupported( "callback arg semantics not understood: %s" % arg.semantics) @@ -953,7 +951,7 @@ 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) - pre_call(""" + post_call(""" if not isinstance(_result, {py_cls}): raise IslTypeError("return value is not a {py_cls}") """ @@ -994,8 +992,10 @@ def gen_callback_wrapper(gen, cb, func_name, has_userptr): gen(""" except Exception as e: import sys - print("[WARNING] An exception occurred in a callback function." - "This exception was ignored.", file=sys.stderr) + sys.stderr.write("[WARNING] An exception occurred " + "in a callback function." + "This exception was ignored.\\n") + sys.stderr.flush() import traceback traceback.print_exc()