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

Unified Diff: mojo/public/python/mojo/system.pyx

Issue 792843002: Refactor the python system_impl module. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « mojo/public/python/mojo/c_thunks.pxd ('k') | mojo/public/python/mojo/system_impl.pyx » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/python/mojo/system.pyx
diff --git a/mojo/public/python/mojo/system.pyx b/mojo/public/python/mojo/system.pyx
index 3eb994f41ae40f4ca3f641a127206a46737e0359..2533babe672c4b56d45ddc8b2280e4eb5b89c04c 100644
--- a/mojo/public/python/mojo/system.pyx
+++ b/mojo/public/python/mojo/system.pyx
@@ -5,6 +5,8 @@
# distutils language = c++
cimport c_core
+cimport c_export # needed so the init function gets exported
+cimport c_thunks
from cpython.buffer cimport PyBUF_CONTIG
@@ -27,10 +29,9 @@ def SetSystemThunks(system_thunks_as_object):
This should only be used by the embedder.
"""
- cdef const c_core.MojoSystemThunks* system_thunks = (
- <const c_core.MojoSystemThunks*><uintptr_t>system_thunks_as_object)
- c_core.MojoSetSystemThunks(system_thunks)
- mojo.system_impl.SetSystemThunks(system_thunks_as_object)
+ cdef const c_thunks.MojoSystemThunks* system_thunks = (
+ <const c_thunks.MojoSystemThunks*><uintptr_t>system_thunks_as_object)
+ c_thunks.MojoSetSystemThunks(system_thunks)
HANDLE_INVALID = c_core.MOJO_HANDLE_INVALID
RESULT_OK = c_core.MOJO_RESULT_OK
@@ -800,4 +801,4 @@ class RunLoop(object):
return None
-_ASYNC_WAITER = mojo.system_impl.ASYNC_WAITER
+_ASYNC_WAITER = mojo.system_impl.AsyncWaiter()
« no previous file with comments | « mojo/public/python/mojo/c_thunks.pxd ('k') | mojo/public/python/mojo/system_impl.pyx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698