Update async a bit
This commit is contained in:
@@ -14,7 +14,7 @@ from cython.operator cimport dereference as deref
|
|||||||
cdef extern from "<utility>" namespace "std":
|
cdef extern from "<utility>" namespace "std":
|
||||||
async.PyPromise movePromise"std::move"(async.PyPromise)
|
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):
|
cdef public object wrap_kj_exception(async.Exception & exception):
|
||||||
return None # TODO
|
return None # TODO
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "kj/async.h"
|
#include "kj/async.h"
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include <iostream>
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
PyObject * wrap_kj_exception(kj::Exception &);
|
PyObject * wrap_kj_exception(kj::Exception &);
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,6 @@ extern "C" {
|
|||||||
PyObject * wrapPyFunc(PyObject * func, PyObject * arg) {
|
PyObject * wrapPyFunc(PyObject * func, PyObject * arg) {
|
||||||
PyObject * result = PyObject_CallFunctionObjArgs(func, arg, NULL);
|
PyObject * result = PyObject_CallFunctionObjArgs(func, arg, NULL);
|
||||||
Py_DECREF(func);
|
Py_DECREF(func);
|
||||||
Py_DECREF(arg);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user