aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fifo.zig
AgeCommit message (Collapse)Author
2021-11-30allocgate: std Allocator interface refactorLee Cannon
2021-11-30std lib API deprecations for the upcoming 0.9.0 releaseAndrew Kelley
See #3811
2021-09-19std.fifo.LinearFifo: ensureUnusedCapacity and ensureTotalCapacityRyan Liptak
Same as c8ae581fef6506a8234cdba1355ba7f0f449031a, but for LinearFifo.
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-05-08std: update usage of std.testingVeikka Tuominen
2021-02-22std.fifo.LinearFifo - Expose reader and writer type.ducdetronquito
2021-02-21fix readable slice bug (and add tests)rgreenblatt
2021-01-08Remove deprecated stream aliasesJay Petacat
2021-01-02std: Use {s} instead of {} when printing stringsLemonBoy
2020-12-31Year++Frank Denis
2020-11-18Merge pull request #6434 from daurnimator/fifo.pumpVeikka Tuominen
std: add LinearFifo(...).pump(src_reader, dest_writer)
2020-09-27Make LinearFifo not crash when discarding from empty bufferIan Simonson
Previously if a LinearFifo was empty and discard was called an unsigned overflow would occur. However it is safe to perform this overflow as a bitwise & operation with 0xFFFFFFFFFFFFFF is a noop
2020-09-27std: add LinearFifo(...).pump(src_reader, dest_writer)daurnimator
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-07-27Use writer for LinearFifo instead of deprecated outStreamfrmdstryr
2020-06-09Support Reader for InStreamJonathan Marler
2020-05-14self-hosted: fix codegen and resolve some analysis bugsAndrew Kelley
2020-04-02std: add LinearFifo().inStreamdaurnimator
2020-04-02std: LinearFifo matches ArrayList in always having outStream methoddaurnimator
2020-03-31Fix std.fifo.LinearFifoTetralux
- Fix undeclared variable in 'writeItem' - Clarify docs of `read` regarding bytes vs. items - Normalize 'writeable' to 'writable' (the more common parlance)
2020-03-13fix all the TODOs from the pull requestAndrew Kelley
* `std.Buffer.print` is removed; use `buffer.outStream().print` * `std.fmt.count` returns a `u64` * `std.Fifo.print` is removed; use `fifo.outStream().print` * `std.fmt.bufPrint` error is renamed from `BufferTooSmall` to `NoSpaceLeft` to match `std.os.write`. * `std.io.FixedBufferStream.getWritten` returns mutable buffer if the buffer is mutable.
2020-03-12Slap in workaround for FifoBenjamin Feng
2020-02-21remove @bytesToSlice, @sliceToBytes from std libxackus
2020-01-29Promoted "leak_count_allocator" to the main testing.allocatorBenjamin Feng
2020-01-29Create leak_count_allocatorBenjamin Feng
2020-01-29Move debug.global_allocator to testing.allocatorBenjamin Feng
2019-12-08std.fmt.format: tuple parameter instead of var argsAndrew Kelley
2019-11-27remove type coercion from array values to referencesAndrew Kelley
* Implements #3768. This is a sweeping breaking change that requires many (trivial) edits to Zig source code. Array values no longer coerced to slices; however one may use `&` to obtain a reference to an array value, which may then be coerced to a slice. * Adds `IrInstruction::dump`, for debugging purposes. It's useful to call to inspect the instruction when debugging Zig IR. * Fixes bugs with result location semantics. See the new behavior test cases, and compile error test cases. * Fixes bugs with `@typeInfo` not properly resolving const values. * Behavior tests are passing but std lib tests are not yet. There is more work to do before merging this branch.
2019-11-25zig fmtAndrew Kelley
2019-11-25std: fix mismatched doc-comment/argument names in fifo.rewinddaurnimator
2019-11-25std: clean up fifo.readableSliceMutdaurnimator
2019-11-25std: fifo.deinit didn't need to take a pointerdaurnimator
2019-11-25std: add fifo.writeItemdaurnimator
2019-11-25std: fix bug in fifo.unget if rewinding doesn't wrap arounddaurnimator
2019-11-25std: follow zig standard library convention and have fifo.read number of itemsdaurnimator
2019-11-25std: fifo rename from FixedSizeFifo to LinearFifodaurnimator
2019-11-25std: fifo now has 3 modes: Static, Slice and Dynamicdaurnimator
2019-11-25std: fix fifo for non-u8 typesdaurnimator
2019-11-25std: add optimization to fifo if size is power of twodaurnimator
2019-11-25std: move auto_align constant to top of comptime functiondaurnimator
At a later point in time this might be made into a parameter
2019-11-25std: fix unfinished doc-comment in fifodaurnimator
2019-11-24Fix FixedSizeFifo buffer typeschroffl
Update the `.buf` property to be a slice of the type that is given as a parameter.
2019-11-08update the codebase to use `@as`Andrew Kelley
2019-11-04std: Add fifo useful for buffersdaurnimator