Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1529)

Unified Diff: mojo/public/python/mojo/c_environment.pxd

Issue 573253002: mojo: Add async waiter for python bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation due to pre-processor variable Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/public/python/mojo/system.pyx » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/python/mojo/c_environment.pxd
diff --git a/mojo/public/python/mojo/c_environment.pxd b/mojo/public/python/mojo/c_environment.pxd
index 16f5c54b8cae4e744ba4bfd2ae1800933245912e..13a0934a717dee877514349871b74f090a7bd992 100644
--- a/mojo/public/python/mojo/c_environment.pxd
+++ b/mojo/public/python/mojo/c_environment.pxd
@@ -4,7 +4,13 @@
# distutils: language = c++
-from libc.stdint cimport int64_t
+from libc.stdint cimport int64_t, intptr_t, uint32_t, uint64_t
+
+
+cdef extern from "mojo/public/c/system/core.h" nogil:
+ ctypedef uint32_t MojoHandle
+ ctypedef uint64_t MojoDeadline
+ ctypedef uint32_t MojoHandleSignals
cdef extern from "mojo/public/cpp/bindings/callback.h" nogil:
@@ -12,9 +18,20 @@ cdef extern from "mojo/public/cpp/bindings/callback.h" nogil:
CClosure()
+cdef extern from "mojo/public/c/environment/async_waiter.h" nogil:
+ ctypedef intptr_t MojoAsyncWaitID
+
+
cdef extern from "mojo/public/python/src/python_system_helper.h" \
- namespace "mojo" nogil:
+ namespace "mojo::python" nogil:
cdef CClosure BuildClosure(object)
+ cdef cppclass PythonAsyncWaiter "mojo::python::PythonAsyncWaiter":
+ PythonAsyncWaiter()
+ MojoAsyncWaitID AsyncWait(MojoHandle,
+ MojoHandleSignals,
+ MojoDeadline,
+ object)
+ void CancelWait(MojoAsyncWaitID)
cdef extern from "mojo/public/cpp/utility/run_loop.h" nogil:
@@ -23,7 +40,8 @@ cdef extern from "mojo/public/cpp/utility/run_loop.h" nogil:
void Run() except *
void RunUntilIdle() except *
void Quit()
- void PostDelayedTask(CClosure& task, int64_t delay)
+ void PostDelayedTask(CClosure&, int64_t)
+
cdef extern from "mojo/public/cpp/environment/environment.h" nogil:
cdef cppclass CEnvironment "mojo::Environment":
« no previous file with comments | « no previous file | mojo/public/python/mojo/system.pyx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698