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

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

Issue 1351293002: Convert remaining scoped_ptr -> std::unique_ptr in //mojo/edk (minus js). (Closed) Base URL: https://github.com/domokit/mojo.git@edk_unique_ptr_5
Patch Set: oops, forgot to fix android Created 5 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 | « mojo/nacl/monacl_shell_nonsfi.cc ('k') | shell/child_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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))
« no previous file with comments | « mojo/nacl/monacl_shell_nonsfi.cc ('k') | shell/child_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698