summaryrefslogtreecommitdiff
path: root/clap.zig
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2023-12-13 08:53:06 +0100
committerGravatar Jimmi Holst Christensen2023-12-13 08:53:06 +0100
commitfeffdff4094ea3927eb3880b46b65e700f1e86fb (patch)
tree071a86610548ebed5b8bec0617cf79cbeeee65fd /clap.zig
parentFix short only params not getting fields in `Arguments` (diff)
downloadzig-clap-no-default-allocator.tar.gz
zig-clap-no-default-allocator.tar.xz
zig-clap-no-default-allocator.zip
Remove the default allocator from `ParseOptions`no-default-allocator
fixes #111
Diffstat (limited to '')
-rw-r--r--clap.zig7
1 files changed, 1 insertions, 6 deletions
diff --git a/clap.zig b/clap.zig
index 302c8bb..e8a43d0 100644
--- a/clap.zig
+++ b/clap.zig
@@ -641,12 +641,7 @@ test "Diagnostic.report" {
641 641
642/// Options that can be set to customize the behavior of parsing. 642/// Options that can be set to customize the behavior of parsing.
643pub const ParseOptions = struct { 643pub const ParseOptions = struct {
644 /// The allocator used for all memory allocations. Defaults to the `heap.page_allocator`. 644 allocator: mem.Allocator,
645 /// Note: You should probably override this allocator if you are calling `parseEx`. Unlike
646 /// `parse`, `parseEx` does not wrap the allocator so the heap allocator can be
647 /// quite expensive. (TODO: Can we pick a better default? For `parse`, this allocator
648 /// is fine, as it wraps it in an arena)
649 allocator: mem.Allocator = heap.page_allocator,
650 diagnostic: ?*Diagnostic = null, 645 diagnostic: ?*Diagnostic = null,
651}; 646};
652 647