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

WIP support Buffer::Use #7

Closed
wants to merge 8 commits into from
Closed

WIP support Buffer::Use #7

wants to merge 8 commits into from

Conversation

trevnorris
Copy link
Collaborator

There may be cases where a user wants to use the original char* instead
of making a copy of the data. This adds support for the new Buffer::Use
method, while creating a shim for pre-v0.11.

Once a name has been approved I'll also add entries into the README.

I'm not sure what an appropriate name for this method should be, hence the ridiculous name. :)

@rvagg
Copy link
Member

rvagg commented Jul 26, 2013

yeah, this is nice, merge it with the 0.2.0 branch though and docs will be interesting--I'll probably use this myself in a few places.

re naming, I'm all for crazy names but "mother" might not be a bit too much of a distraction. Perhaps "original", "source", or maybe even just NanBufferUse() to match up with Buffer::Use()?

@trevnorris
Copy link
Collaborator Author

Hah. The ridiculous name was intentional as a reminder to have it changed. NanBufferUse() sounds good. I'll update with that and add the docs to the README.

@trevnorris
Copy link
Collaborator Author

@rvagg I switched this over to the 0.2.0 branch, hence all the extra commits. Please take another look at 7ec7337 to make sure style and wording are adequate.

There may be cases where a user wants to use the original char* instead
of making a copy of the data. This adds support for the new Buffer::Use
method, while creating a shim for pre-v0.11.

Once a name has been approved I'll also add entries into the README.
@rvagg
Copy link
Member

rvagg commented Jul 27, 2013

very nice

@rvagg
Copy link
Member

rvagg commented Jul 27, 2013

I've merged this in to 0.2.0, see #6. I had to add a static inline for FreeData to not get linking errors when using nan.h in multiple files.

@rvagg rvagg closed this Jul 27, 2013
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.

3 participants