| 330 | // Foreign buffer |
| 331 | |
| 332 | Status PyForeignBuffer::Make(const uint8_t* data, int64_t size, PyObject* base, |
| 333 | std::shared_ptr<Buffer>* out) { |
| 334 | PyForeignBuffer* buf = new PyForeignBuffer(data, size, base); |
| 335 | if (buf == NULL) { |
| 336 | return Status::OutOfMemory("could not allocate foreign buffer object"); |
| 337 | } else { |
| 338 | *out = std::shared_ptr<Buffer>(buf); |
| 339 | return Status::OK(); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | // ---------------------------------------------------------------------- |
| 344 | // TransformInputStream::TransformFunc wrapper |
nothing calls this directly
no test coverage detected