11#ifndef PythonMonkey_PromiseType_
12#define PythonMonkey_PromiseType_
15#include <js/Promise.h>
32 static PyObject *
getPyObject(JSContext *cx, JS::HandleObject promise);
40 static JSObject *
toJsPromise(JSContext *cx, PyObject *pyObject);
56static PyObject *futureOnDoneCallback(PyObject *futureCallbackTuple, PyObject *args);
61static bool onResolvedCb(JSContext *cx,
unsigned argc, JS::Value *vp);
bool PythonAwaitable_Check(PyObject *obj)
Check if the object can be used in Python await expression. PyAwaitable_Check hasn't been and has no ...
Definition PromiseType.cc:142
This struct represents the JS Promise type in Python using our custom pythonmonkey....
Definition PromiseType.hh:22
static JSObject * toJsPromise(JSContext *cx, PyObject *pyObject)
Convert a Python awaitable object to JS Promise.
Definition PromiseType.cc:122
static PyObject * getPyObject(JSContext *cx, JS::HandleObject promise)
Construct a new PromiseType object from a JS::PromiseObject.
Definition PromiseType.cc:70