python: use shared_ptr, make_shared from Cython

This commit is contained in:
Adrien Béraud committed 2023-11-06 21:59:22 -05:00
1 parent bad8bdfe13
commit ae2a1d83cf
1 file changed
+1 -10
+1 -10
View File
@@ -21,6 +21,7 @@ from libcpp.string cimport string
from libcpp.vector cimport vector
from libcpp.utility cimport pair
from libcpp.map cimport map
from libcpp.memory cimport shared_ptr, make_shared
from libc.string cimport const_char, const_uchar
ctypedef uint16_t in_port_t
@@ -34,16 +35,6 @@ cdef extern from "<chrono>" namespace "std::chrono" nogil:
duration seconds(uint64_t) except +
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 cppclass hash[T]:
hash() except +