-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove NULL-char related comments when using `CStr` - that's the definition of it. * casting `cstr.as_ptr()` with `.cast::<c_char>()` is redundant - it's already that. * modify `WS::copy_bytes_with_null` to return `CStr`, and marked it as `unsafe`. Current implementation relies on the input value to not contain any `\0` chars, and would result in UB otherwise. Overall, I think current string handling needs some work - `VCL_STRING` seems to be equivalent to `CStr`, and Varnish guarantees(?) it not to have NULLs. If so, `CStr` could be treated as a tier-1 type together (allowed by callback functions as arg and return).
- Loading branch information
Showing
6 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters