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

Don't store free/copy/compare function pointers #12

Open
ghost opened this issue May 21, 2021 · 2 comments
Open

Don't store free/copy/compare function pointers #12

ghost opened this issue May 21, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented May 21, 2021

The existence of them is known at compile time based on P and T, so it should be possible to remove the function pointers from the structs. This is equivalent to what template C++ does.

For user overriding, it could be made so that FREE, COPY, COMPARE can be defined to custom function(s).

@glouw
Copy link
Owner

glouw commented May 25, 2021

I suppose. Copy does fall back on implicit_copy. The additional ifdefs may make the source just that much more difficult to maintain

@ghost
Copy link
Author

ghost commented May 25, 2021

I'll show a patch for at least a few of the data structures, it shouldn't be too bad...

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

No branches or pull requests

1 participant