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

Complete hedley refactoring #1011

Open
jaromil opened this issue Jan 20, 2025 · 0 comments
Open

Complete hedley refactoring #1011

jaromil opened this issue Jan 20, 2025 · 0 comments
Assignees

Comments

@jaromil
Copy link
Member

jaromil commented Jan 20, 2025

Following the #999 merge, the internal C code refactoring is left half-way for the following zenroom types:

  • big
  • time
  • float
  • ecdh

The refactoring needs to add a ->ref counter to the structs and convert the _arg function to avoid an additional memcpy on the returned value.

The _free call needs to check the ->ref counter before freeing, which is set to one by _new

Also the pointers returned by _arg need to be flagged const and consequently all function signatures interacting with them adjusted to guard modification by callers, and enable modifications on dups only by milagro functions.

A final round of checks on milagro functions that do not modify o_arg values should be also made by hand.

@jaromil jaromil self-assigned this Jan 20, 2025
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