| Index: mojo/python/system/mojo_embedder.pyx
|
| diff --git a/mojo/python/system/mojo_embedder.pyx b/mojo/python/system/mojo_embedder.pyx
|
| index 75ae38797f46c2c75df79816d408bd28b1ea271c..bd30ddd77f45957845eb0b75ee8bd8f3b45960b4 100644
|
| --- a/mojo/python/system/mojo_embedder.pyx
|
| +++ b/mojo/python/system/mojo_embedder.pyx
|
| @@ -13,9 +13,12 @@ import mojo_system_impl
|
| cdef extern from "third_party/cython/python_export.h":
|
| pass
|
|
|
| -cdef extern from "base/memory/scoped_ptr.h":
|
| - cdef cppclass scoped_ptr[T]:
|
| - scoped_ptr(T*)
|
| +# TODO(vtl): More recent versions of cython have a libcpp.memory with
|
| +# |unique_ptr|.
|
| +cdef extern from "<memory>" \
|
| + namespace "std" nogil:
|
| + cdef cppclass unique_ptr[T]:
|
| + unique_ptr(T*)
|
|
|
| cdef extern from "mojo/edk/embedder/platform_support.h" \
|
| namespace "mojo::embedder" nogil:
|
| @@ -29,7 +32,7 @@ cdef extern from "mojo/edk/embedder/simple_platform_support.h" \
|
|
|
| cdef extern from "mojo/edk/embedder/embedder.h" nogil:
|
| cdef void InitCEmbedder "mojo::embedder::Init"(
|
| - scoped_ptr[PlatformSupport] platform_support)
|
| + unique_ptr[PlatformSupport] platform_support)
|
|
|
| cdef extern from "mojo/public/platform/native/system_thunks.h" nogil:
|
| cdef struct MojoSystemThunks:
|
| @@ -40,8 +43,7 @@ cdef extern from "mojo/edk/embedder/test_embedder.h" nogil:
|
| cdef bool ShutdownCEmbedderForTest "mojo::embedder::test::Shutdown"()
|
|
|
| def Init():
|
| - InitCEmbedder(scoped_ptr[PlatformSupport](
|
| - new SimplePlatformSupport()))
|
| + InitCEmbedder(unique_ptr[PlatformSupport](new SimplePlatformSupport()))
|
| cdef MojoSystemThunks thunks = MojoMakeSystemThunks()
|
| mojo_system.SetSystemThunks(<uintptr_t>(&thunks))
|
| mojo_system_impl.SetSystemThunks(<uintptr_t>(&thunks))
|
|
|