-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathPyCoroutineWrapper.java
More file actions
60 lines (47 loc) · 1.79 KB
/
Copy pathPyCoroutineWrapper.java
File metadata and controls
60 lines (47 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package org.python.core;
import org.python.expose.ExposedMethod;
import org.python.expose.ExposedType;
@ExposedType(name = "coroutine_wrapper", doc = BuiltinDocs.coroutine_wrapper_doc)
public class PyCoroutineWrapper extends PyObject {
private PyCoroutine cw_coroutine;
public static final PyType TYPE = PyType.fromClass(PyCoroutineWrapper.class);
public PyCoroutineWrapper(PyCoroutine coroutine) {
super(TYPE);
cw_coroutine = coroutine;
}
public PyObject send(PyObject value) {
return coroutine_wrapper_send(value);
}
@ExposedMethod(doc = BuiltinDocs.coroutine_wrapper_send_doc)
final PyObject coroutine_wrapper_send(PyObject value) {
return cw_coroutine.send(value);
}
public PyObject close() {
return coroutine_wrapper_close();
}
@ExposedMethod(doc = BuiltinDocs.coroutine_wrapper_close_doc)
final PyObject coroutine_wrapper_close() {
return cw_coroutine.close();
}
public PyObject throw$(PyObject type, PyObject value, PyObject tb) {
return coroutine_wrapper_throw$(type, value, tb);
}
@ExposedMethod(names = "throw", doc = BuiltinDocs.coroutine_wrapper_throw_doc)
final PyObject coroutine_wrapper_throw$(PyObject type, PyObject value, PyObject tb) {
return cw_coroutine.throw$(type, value, tb);
}
public PyObject __iter__() {
return coroutine_wrapper___iter__();
}
@ExposedMethod(doc = BuiltinDocs.coroutine_wrapper___iter___doc)
final PyObject coroutine_wrapper___iter__() {
return this;
}
public PyObject __next__() {
return coroutine_wrapper___next__();
}
@ExposedMethod(doc = BuiltinDocs.coroutine_wrapper___next___doc)
final PyObject coroutine_wrapper___next__() {
return cw_coroutine.send(Py.None);
}
}