Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a trivial char array object #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jakirkham
Copy link
Owner

This builds up a basic char array object in C with some Python trappings for handling construction and cleanup of the object. Otherwise provides no interface for accessing this object in Python. Since it's purpose is merely to manage a block of memory requested by the user to be passed off and used by other objects that implement the buffer protocol, there is no need for it to have other functionality. It simply allocates memory from Python's memory allocator and frees it on cleanup. Implements the buffer protocol in Cython for this object. Thus allowing the memory allocated to be reused by NumPy arrays or other Python objects that support the buffer protocol.

@jakirkham jakirkham force-pushed the mk_char_arr branch 2 times, most recently from 2c1a2a6 to b7575b9 Compare August 7, 2018 07:30
@jakirkham
Copy link
Owner Author

Still need to do something with the flags.

@jakirkham jakirkham force-pushed the mk_char_arr branch 18 times, most recently from ecbe14c to bbb5fe0 Compare August 8, 2018 06:04
This builds up a basic char array object in C with some Python trappings
for handling construction and cleanup of the object. Otherwise provides
no interface for accessing this object in Python. Since it's purpose is
merely to manage a block of memory requested by the user to be passed
off and used by other objects that implement the buffer protocol, there
is no need for it to have other functionality. It simply allocates
memory from Python's memory allocator and frees it on cleanup.
Implements the buffer protocol in Cython for this object. Thus allowing
the memory allocated to be reused by NumPy arrays or other Python
objects that support the buffer protocol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant