Skip to content
This repository was archived by the owner on Mar 8, 2018. It is now read-only.

support C buffer protocol #17

@teepark

Description

@teepark

unfortunately it changed dramatically between python 2 and 3, but there is a protocol by which objects implemented in C can support memory sharing. this could be used with file objects for example to dump a json stream straight to the file object's buffer rather than creating a PyString and calling .read() through python.

this would need to fall back to current behavior as pure-python file-like objects should be supported.

see http://docs.python.org/release/2.6.5/c-api/typeobj.html#buffer-object-structures and http://docs.python.org/release/2.6.5/c-api/objbuffer.html

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions