Skip to content

Commit 26839e3

Browse files
vyasrjakirkham
andauthored
Apply suggestions from code review
Co-authored-by: jakirkham <[email protected]>
1 parent 376c42f commit 26839e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/rmm/rmm/_lib/device_buffer.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import numpy as np
1515

1616
cimport cython
17-
from cpython.bytes cimport PyBytes_AsString, PyBytes_FromStringAndSize
17+
from cpython.bytes cimport PyBytes_FromStringAndSize
1818
from libc.stdint cimport uintptr_t
1919
from libcpp.memory cimport unique_ptr
2020
from libcpp.utility cimport move
@@ -314,7 +314,7 @@ cdef class DeviceBuffer:
314314
cdef size_t s = dbp.size()
315315

316316
cdef bytes b = PyBytes_FromStringAndSize(NULL, s)
317-
cdef unsigned char* p = <unsigned char*>PyBytes_AsString(b)
317+
cdef unsigned char* p = b
318318
cdef unsigned char[::1] mv = (<unsigned char[:(s + 1):1]>p)[:s]
319319
self.copy_to_host(mv, stream)
320320

0 commit comments

Comments
 (0)