Function: ptr_to_bytes
C Prototype |
None |
|---|---|
Python Function |
bytes_out = acl.util.ptr_to_bytes(ptr, size) |
Function Usage |
Converts void* data to a bytes object so that Python code can directly access the data. |
Input Description |
ptr: int, pointer address in the C language. It is the start address of the data that can be accessed. size: int, data size, in bytes. |
Return Value |
bytes_out: bytes object. |
Restrictions |
None |
Precautions |
You are advised to use Function: bytes_to_ptr because acl.util.ptr_to_bytes deteriorates data performance. bytes_out = acl.util.ptr_to_bytes(bytes_ptr, size) |
Parent topic: Util Module