numba
numba copied to clipboard
pythonapi function for PyBytes_AsStringAndSize?
It looks like pythonapi.py doesn't have a function for PyBytes_AsStringAndSize (or PyBytes_AsString
or PyBytes_Size
, for that matter).
We could implement it manually, following an example like
https://github.com/numba/numba/blob/60723cb5a31d0b6ef516af95602a463322991420/numba/core/pythonapi.py#L470-L475
But are there any plans to fill out this part of the PythonAPI
class with these methods?
Thanks!
Cc: @ianna
No plans, but I know some of these were driven by requests, so I'll check if there's any reason we didn't.
There wasn't a reason we needed it, so we didn't bother. We can add it or if you want to create a PR because you have the code for it, that works too.
I'd be happy to create a PR for it. Thanks!
Closing as implemented in #8462 with thanks to @ianna!