diff --git a/capnp/async.pyx b/capnp/async.pyx index 5c1b980..afe4605 100644 --- a/capnp/async.pyx +++ b/capnp/async.pyx @@ -14,7 +14,7 @@ from cython.operator cimport dereference as deref cdef extern from "" namespace "std": async.PyPromise movePromise"std::move"(async.PyPromise) -# This is a really weird function. By making it public, we'll be able to call it from asyncHelper.h +# By making it public, we'll be able to call it from asyncHelper.h cdef public object wrap_kj_exception(async.Exception & exception): return None # TODO diff --git a/capnp/asyncHelper.h b/capnp/asyncHelper.h index 62d44c9..f213375 100644 --- a/capnp/asyncHelper.h +++ b/capnp/asyncHelper.h @@ -1,6 +1,6 @@ #include "kj/async.h" #include "Python.h" -#include + extern "C" { PyObject * wrap_kj_exception(kj::Exception &); } @@ -8,7 +8,6 @@ extern "C" { PyObject * wrapPyFunc(PyObject * func, PyObject * arg) { PyObject * result = PyObject_CallFunctionObjArgs(func, arg, NULL); Py_DECREF(func); - Py_DECREF(arg); return result; }