Chromium Code Reviews| Index: mojo/python/content_handler/system_impl.pyx |
| diff --git a/mojo/public/python/mojo/system_impl.pyx b/mojo/python/content_handler/system_impl.pyx |
| similarity index 66% |
| copy from mojo/public/python/mojo/system_impl.pyx |
| copy to mojo/python/content_handler/system_impl.pyx |
| index 3e299c1487180d389f8a8ba71c78ac69a375461d..aec19249c495bfd72e6cd13c126fe831f6c36a58 100644 |
| --- a/mojo/public/python/mojo/system_impl.pyx |
| +++ b/mojo/python/content_handler/system_impl.pyx |
| @@ -5,30 +5,25 @@ |
| # distutils language = c++ |
| cimport c_async_waiter |
| -cimport c_environment |
| -cimport c_export # needed so the init function gets exported |
| -cimport c_thunks |
| +cimport c_base |
| +cimport c_export |
| from libc.stdint cimport uintptr_t |
| - |
| def SetSystemThunks(system_thunks_as_object): |
| """Bind the basic Mojo Core functions. |
| """ |
| - cdef const c_thunks.MojoSystemThunks* system_thunks = ( |
| - <const c_thunks.MojoSystemThunks*><uintptr_t>system_thunks_as_object) |
| - c_thunks.MojoSetSystemThunks(system_thunks) |
| + raise NotImplementedError() |
|
qsr
2015/01/07 15:14:46
I think you should not even write the method.
etiennej
2015/01/08 11:23:13
Done.
|
| cdef class RunLoop(object): |
| """RunLoop to use when using asynchronous operations on handles.""" |
| - cdef c_environment.CRunLoop* c_run_loop |
| + cdef c_base.PythonRunLoop* c_run_loop |
| def __init__(self): |
| - assert not <uintptr_t>(c_environment.CRunLoopCurrent()) |
| - self.c_run_loop = new c_environment.CRunLoop() |
| + self.c_run_loop = new c_base.PythonRunLoop() |
| def __dealloc__(self): |
| del self.c_run_loop |
| @@ -50,23 +45,19 @@ cdef class RunLoop(object): |
| Post a task on the runloop. This must be called from the thread owning the |
| runloop. |
| """ |
| - cdef c_environment.CClosure closure = c_environment.BuildClosure(runnable) |
| - self.c_run_loop.PostDelayedTask(closure, delay) |
| + self.c_run_loop.PostDelayedTask(runnable, delay) |
| # We use a wrapping class to be able to call the C++ class PythonAsyncWaiter |
| # across module boundaries. |
| cdef class AsyncWaiter(object): |
| - cdef c_environment.CEnvironment* _cenvironment |
| cdef c_async_waiter.PythonAsyncWaiter* _c_async_waiter |
| def __init__(self): |
| - self._cenvironment = new c_environment.CEnvironment() |
| - self._c_async_waiter = c_environment.NewAsyncWaiter() |
| + self._c_async_waiter = c_base.NewAsyncWaiter() |
| def __dealloc__(self): |
| del self._c_async_waiter |
| - del self._cenvironment |
| def AsyncWait(self, handle, signals, deadline, callback): |
| return self._c_async_waiter.AsyncWait(handle, signals, deadline, callback) |