Skip to content
Snippets Groups Projects
Commit ae2a1d83 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

python: use shared_ptr, make_shared from Cython

parent bad8bdfe
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ from libcpp.string cimport string ...@@ -21,6 +21,7 @@ from libcpp.string cimport string
from libcpp.vector cimport vector from libcpp.vector cimport vector
from libcpp.utility cimport pair from libcpp.utility cimport pair
from libcpp.map cimport map from libcpp.map cimport map
from libcpp.memory cimport shared_ptr, make_shared
from libc.string cimport const_char, const_uchar from libc.string cimport const_char, const_uchar
ctypedef uint16_t in_port_t ctypedef uint16_t in_port_t
...@@ -34,16 +35,6 @@ cdef extern from "<chrono>" namespace "std::chrono" nogil: ...@@ -34,16 +35,6 @@ cdef extern from "<chrono>" namespace "std::chrono" nogil:
duration seconds(uint64_t) except + duration seconds(uint64_t) except +
duration seconds() duration seconds()
cdef extern from "<memory>" namespace "std" nogil:
cdef cppclass shared_ptr[T]:
shared_ptr() except +
shared_ptr(T*) except +
T* get()
T operator*()
bool operator bool() const
void reset(T*)
shared_ptr[T] make_shared[T](...) except +
cdef extern from "<functional>" namespace "std" nogil: cdef extern from "<functional>" namespace "std" nogil:
cdef cppclass hash[T]: cdef cppclass hash[T]:
hash() except + hash() except +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment