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

Clean up extension types API, introduce json text subtype #1054

Merged
merged 6 commits into from
Mar 4, 2025

Conversation

PThorpe92
Copy link
Contributor

This PR cleans up some comments in the extension API and prevents extensions themselves from calling 'free' on Value types that are exposed to the user facing traits, as well as changes the from_ffi method for OwnedValues to take ownership and automatically free the values to prevent memory leaks.

This PR also finds the name of the args: &[Value] argument for scalar functions in extensions, and uses that in the proc macro, instead of relying on documentation to communicate that the parameter must be named args.

@PThorpe92 PThorpe92 force-pushed the ext_types_ownership branch from aa06065 to 741c4e8 Compare March 1, 2025 19:28
@PThorpe92 PThorpe92 changed the title Prevent extensions from accidentally freeing value types, fix comments and scalar proc macro Clean up extension types API, introduce json text subtype Mar 1, 2025
@penberg penberg closed this in ddb1881 Mar 4, 2025
@penberg penberg merged commit ddb1881 into tursodatabase:main Mar 4, 2025
28 checks passed
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.

2 participants