We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 376c42f commit 26839e3Copy full SHA for 26839e3
python/rmm/rmm/_lib/device_buffer.pyx
@@ -14,7 +14,7 @@
14
import numpy as np
15
16
cimport cython
17
-from cpython.bytes cimport PyBytes_AsString, PyBytes_FromStringAndSize
+from cpython.bytes cimport PyBytes_FromStringAndSize
18
from libc.stdint cimport uintptr_t
19
from libcpp.memory cimport unique_ptr
20
from libcpp.utility cimport move
@@ -314,7 +314,7 @@ cdef class DeviceBuffer:
314
cdef size_t s = dbp.size()
315
316
cdef bytes b = PyBytes_FromStringAndSize(NULL, s)
317
- cdef unsigned char* p = <unsigned char*>PyBytes_AsString(b)
+ cdef unsigned char* p = b
318
cdef unsigned char[::1] mv = (<unsigned char[:(s + 1):1]>p)[:s]
319
self.copy_to_host(mv, stream)
320
0 commit comments