aboutsummaryrefslogtreecommitdiff
path: root/lib/std/buffer.zig
AgeCommit message (Collapse)Author
2019-12-20fix std.mem.addNullByte and implement sentinel slicingAndrew Kelley
see #3770
2019-12-08std.fmt.format: tuple parameter instead of var argsAndrew Kelley
2019-11-27Merge pull request #3769 from MCRusher/initcapacity-for-buffer-arraylistAndrew Kelley
Add initCapacity for buffer & arraylist
2019-11-24make std.mem.toSlice use null terminated pointersAndrew Kelley
and fix the fallout
2019-11-23Added initCapacity, capacity, and 2 tests.MCRusher
Added Buffer.initCapcity() to buffer to allow preallocation of a block of memory to reduce future allocations. Uses the added ArrayList.initCapacity() function to achieve this. Added Buffer.capacity() to track current usable allocation size, not counting null byte, and returning 0 if empty or created with Buffer.initNull() Added a test for initCapacity() that shows that no further allocation is performed for an append of size smaller than or equal to capacity when initCapacity is used. Added a test for initSize(), since it did not exist already. Also added a comment to better explain the difference between initSize() and initCapacity() note: forgot in the first commit but thanks to mikdusan for helping me brainstorm, through the process, and for drawing up a draft diff which I tweaked.
2019-10-29basic DNS address resolution for linux without libcAndrew Kelley
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221