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

Separate callback functions for cork_mempool #106

Merged
merged 1 commit into from Aug 26, 2015

Conversation

dcreager
Copy link
Owner

The cork_mempool type lets you provide init_object and done_object callbacks, which are called when an instance is first allocated and finally deallocated (i.e., exactly once per instance, regardless of how many times the instance is reused). This patch updates the API to have separate functions for setting each of those callbacks, instead of the single big function — this is more consistent with our current pattern, and is nicer for ABI compatibility reasons.

The existing set_callbacks function still exists, but it's now deprecated and no longer mentioned in the documentation.

The cork_mempool type lets you provide `init_object` and `done_object`
callbacks, which are called when an instance is first allocated and
finally deallocated (i.e., exactly once per instance, regardless of how
many times the instance is reused).  This patch updates the API to have
separate functions for setting each of those callbacks, instead of the
single big function — this is more consistent with our current pattern,
and is nicer for ABI compatibility reasons.

The existing `set_callbacks` function still exists, but it's now
deprecated and no longer mentioned in the documentation.
@dcreager
Copy link
Owner Author

@johnzachary ready for review

@dcreager
Copy link
Owner Author

and/or @ermaxw

@johnzachary
Copy link
Collaborator

+1 Looks like the way we should have done it all along 😄

dcreager pushed a commit that referenced this pull request Aug 26, 2015
Separate callback functions for cork_mempool
@dcreager dcreager merged commit 71cf426 into develop Aug 26, 2015
@dcreager dcreager deleted the feature/mempool-callbacks branch August 26, 2015 18:37
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.

None yet

2 participants