aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fifo.zig
AgeCommit message (Collapse)Author
2025-08-07remove std.fifoAndrew Kelley
I never liked how this data structure took its API as a parameter. This use case is now served by std.Io buffering.
2025-07-07std.io: deprecated Reader/Writer; introduce new APIAndrew Kelley
2025-02-06runtime page size detectionArchbirdplus
heap.zig: define new default page sizes heap.zig: add min/max_page_size and their options lib/std/c: add miscellaneous declarations heap.zig: add pageSize() and its options switch to new page sizes, especially in GPA/stdlib mem.zig: remove page_size
2024-03-21std: promote tests to doctestsAndrew Kelley
Now these show up as "example usage" in generated documentation.
2024-02-01std: eliminate some uses of `usingnamespace`mlugg
This eliminates some simple usages of `usingnamespace` in the standard library. This construct may in future be removed from the language, and is generally an inappropriate way to formulate code. It is also problematic for incremental compilation, which may not initially support projects using it. I wasn't entirely sure what the appropriate namespacing for the types in `std.os.uefi.tables` would be, so I ofted to preserve the current namespacing, meaning this is not a breaking change. It's possible some of the moved types should instead be namespaced under `BootServices` etc, but this can be a future enhancement.
2023-10-23x86_64: implement enough to pass unicode testsJacob Young
* implement vector comparison * implement reduce for bool vectors * fix `@memcpy` bug * enable passing std tests
2023-10-22Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""Jacob Young
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"Andrew Kelley
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.
2023-10-22Merge pull request #17637 from jacobly0/x86_64-test-stdJacob Young
x86_64: start to enable `test-std` and `test-compiler-rt` testing
2023-10-21Fix simple doc mistakes. (#17624)JustinWayland
* Add missing period in Stack's description This looks fine in the source, but looks bad when seen on the documentation website. * Correct documentation for attachSegfaultHandler() The description for attachSegfaultHandler() looks pretty bad without indicating that the stuff at the end is code * Added missing 'the's in Queue.put's documentation * Fixed several errors in Stack's documentation `push()` and `pop()` were not styled as code There was no period after `pop()`, which looks bad on the documentation. * Fix multiple problems in base64.zig Both "invalid"s in Base64.decoder were not capitalized. Missing period in documentation of Base64DecoderWithIgnore.calcSizeUpperBound. * Fix capitalization typos in bit_set.zig In DynamicBitSetUnmanaged.deinit's and DynamicBitSet.deinit's documentation, "deinitializes" was uncapitalized. * Fix typos in fifo.zig's documentation Added a previously missing period to the end of the first line of LinearFifo.writableSlice's documentation. Added missing periods to both lines of LinearFifo.pump's documentation. * Fix typos in fmt.bufPrint's documentation The starts of both lines were not capitalized. * Fix minor documentation problems in fs/file.zig Missing periods in documentation for Permissions.setReadOnly, PermissionsWindows.setReadOnly, MetadataUnix.created, MetadataLinux.created, and MetadataWindows.created. * Fix a glaring typo in enums.zig * Correct errors in fs.zig * Fixed documentation problems in hash_map.zig The added empty line in verify_context's documentation is needed, otherwise autodoc for some reason assumes that the list hasn't been terminated and continues reading off the rest of the documentation as if it were part of the second list item. * Added lines between consecutive URLs in http.zig Makes the documentation conform closer to what was intended. * Fix wrongfully ended sentence in Uri.zig * Handle wrongly entered comma in valgrind.zig. * Add missing periods in wasm.zig's documentation * Fix odd spacing in event/loop.zig * Add missing period in http/Headers.zig * Added missing period in io/limited_reader.zig This isn't in the documentation due to what I guess is a limitation of autodoc, but it's clearly supposed to be. If it was, it would look pretty bad. * Correct documentation in math/big/int.zig * Correct formatting in math/big/rational.zig * Create an actual link to ZIGNOR's paper. * Fixed grammatical issues in sort/block.zig This will not show up in the documentation currently. * Fix typo in hash_map.zig
2023-10-21x86_64: disable failing tests, enable test-std testingJacob Young
2023-08-06std: remove some unused imports (#16710)Zachary Raineri
2023-06-16migration: std.math.{min, min3, max, max3} -> `@min` & `@max`r00ster91
2023-06-13std.fifo.LinearFifo: remove `ensureCapacity` (deprecated in 0.9)Eric Joldasov
Followup to 902df103c6151c257c90de9ba5f29f7f4b9dbea2. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-04-28update codebase to use `@memset` and `@memcpy`Andrew Kelley
2023-04-25change semantics of `@memcpy` and `@memset`Andrew Kelley
Now they use slices or array pointers with any element type instead of requiring byte pointers. This is a breaking enhancement to the language. The safety check for overlapping pointers will be implemented in a future commit. closes #14040
2023-03-15add std.LinearFifo.readableSliceOfLenAndrew Kelley
2023-03-15std.fifo: make toOwnedSlice support head != 0Andrew Kelley
2023-03-15std.fifo: add toOwnedSlice methodAndrew Kelley
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