Miscellaneous

This commit is contained in:
Lasse Blaauwbroek
2023-06-09 22:01:32 +02:00
parent d6261b6d79
commit 0483596da1
3 changed files with 3 additions and 10 deletions

View File

@@ -65,13 +65,6 @@ kj::Promise<kj::Own<PyRefCounter>> wrapPyFunc(kj::Own<PyRefCounter> func, kj::Ow
return stealPyRef(result);
}
kj::Promise<kj::Own<PyRefCounter>> wrapPyFuncNoArg(kj::Own<PyRefCounter> func) {
GILAcquire gil;
PyObject * result = PyObject_CallFunctionObjArgs(func->obj, NULL);
check_py_error();
return stealPyRef(result);
}
::kj::Promise<kj::Own<PyRefCounter>> then(kj::Promise<kj::Own<PyRefCounter>> promise,
kj::Own<PyRefCounter> func, kj::Own<PyRefCounter> error_func) {
if(error_func->obj == Py_None)