make IOBuf.__iter__ yield Python builtin memoryview
Summary: So it may be easier to use in Python code. A lot of Python code will check the type with this: ``` if isinstance(obj, (bytes, memoryview)): ... ``` Currently, the `IOBuf.__iter__` returns a `cython.view.memoryview` c-type (which can be only "cimport" in cython but not able to "import), and to make it useable in scenarios like above, we have to explicitly cast it to builtin `memoryview`. With this change, the use of the iterator is more natural. Reviewed By: fried Differential Revision: D25577842 fbshipit-source-id: 6b22028d06bba639fca32f7de3a063e1fb1baa15
Showing
Please register or sign in to comment