diff options
| author | Mathew R Gordon <72643694+mgord9518@users.noreply.github.com> | 2023-07-17 08:16:17 -0600 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2023-07-18 11:44:23 +0200 |
| commit | 11695745e5c6cbd158625d2c1682a09e2ee4c679 (patch) | |
| tree | 71df103adf7fedece1ec2401c616682e72fd5e16 /lib/std/json/stringify_test.zig | |
| parent | a0b35249a29c6869650ba7e3515999fcced8dcf2 (diff) | |
| download | zig-11695745e5c6cbd158625d2c1682a09e2ee4c679.tar.gz zig-11695745e5c6cbd158625d2c1682a09e2ee4c679.zip | |
getenv: remove unnessary `small key` block
The code removed does unnecessary copying in order to create a null-terminated pointer, just to pass it to libc getenv. It only does this for `small keys`, which are under 64 bytes in size.
Instead of going out of the way to add a null byte to a function that takes normal slices, this should just be handled by the loop below, which scans c.environ to find the value
Diffstat (limited to 'lib/std/json/stringify_test.zig')
0 files changed, 0 insertions, 0 deletions
