This repository has been archived by the owner on Sep 27, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use opportunistic zero-copy strategy in
send
(#35)
Use `ffi.from_buffer` more aggressively when the data type and CFFI version support it. Older versions of CFFI don't support commonly used types like `bytes` but do work for some variants of `memoryview`. Instead of instance and version checking all the permutations this patch attempts the fast path first and catches `TypeError` as a condition to degrade to the slow path of `ffi.new`. See: http://cffi.readthedocs.io/en/latest/ref.html#ffi-buffer-ffi-from-buffer Fixes #34
- Loading branch information