Commit b1633d7
authored
fix(ffi/ada_free_owned_string): c parameter is passed by value (#65)
* fix(ffi/ada_free_owned_string): c parameter is passed by value
While working on #63, I noticed that my Drop wasn't correctly working because the Rust Implementation was assuming that the C parameters are passed by pointer, while they are actually passed by value
Then on a deeper check of the C code, found it at https://github.com/ada-url/ada/blob/1227f60798b05a04412af867d2f13ed20ead9243/include/ada_c.h#L53C6-L53C27.
BREAKING CHANGE: ada_free_owned_string parameter pass by value
* test(ffi/ada_free_owned_string): add
Add a single test case for ada_free_owned_string
This way, the provided function is always present and always used in the codebase.
Test case is based on the previously present test case for idna_to_ascii
* style(ffi/tests): format
Had not previously formatted the code1 parent 7cd8574 commit b1633d7
1 file changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
0 commit comments