Commit graph

16625 commits

Author SHA1 Message Date
Per Nordlöw
3cada1e3c2 Avoid two calls to put in enum overload of formatValueImpl 2022-10-12 09:10:02 +02:00
Per Nordlöw
1b6b22eab3 Remove variable members in formatValueImpl 2022-10-12 07:07:42 +02:00
Paul Backus
53240af537
Use __traits(identifier) to format enum member (#8594)
No behavioral change, but simplifies the code.
2022-10-12 05:57:34 +08:00
Per Nordlöw
5fa1eb3442 Avoid use of EnumMembers in enum specialization of formatValueImpl 2022-10-11 14:37:19 +02:00
Per Nordlöw
ee64840397 Replace enforce(!empty with assert(!empty at the beginning of range members 2022-10-10 09:08:23 +02:00
Razvan Nitu
29a71efbae
Merge pull request #8585 from ibuclaw/httpsdownloads
Update downloads.dlang.org links to use https
2022-10-05 05:29:28 +03:00
Atila Neves
03ac553e03 Fix issue 21000 - allow use of std{in,out,err} with -preview=nosharedaccess 2022-10-04 18:50:10 +02:00
Iain Buclaw
176857162d Update downloads.dlang.org links to use https 2022-10-03 22:21:33 +02:00
Paul Backus
aaa0b705ec
Merge pull request #8368 from dukc/safe-ref-counted
Safe ref counted
2022-10-03 15:05:52 -04:00
Razvan Nitu
0448900fc5
Merge pull request #8584 from dkorpel/base64-nogc
Fix 23370 - std.base64 can have more @nogc functions
2022-09-27 05:08:34 +03:00
The Dlang Bot
b026e490c4
Merge pull request #8580 from jamesragray/b18975
Make permutations into forward range.

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Signed-off-by: H. S. Teoh <quickfur@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2022-09-27 01:05:31 +02:00
james
872bb2cdb4 Fixed a typo in comment. 2022-09-26 22:49:44 +02:00
Dennis Korpel
57eea554de Fix 23370 - std.base64 can have more @nogc functions 2022-09-26 12:14:40 +02:00
Razvan Nitu
88aa69b14f
Merge pull request #8570 from jamesragray/untilsimplerfix
Fix issue 14543: std.algorithm.searching.until does n…
2022-09-26 05:56:49 +03:00
Razvan Nitu
07bbd10eb9
Merge pull request #8550 from wolframw/nothrow_contracts2
improve precondition of std.path.globMatch
2022-09-26 05:47:20 +03:00
Razvan Nitu
81ab617b50
Merge pull request #8574 from pbackus/region-issue-23090
[allocator/region] Issue 23090 - Don't use NullAllocator as a sentinel type
2022-09-26 05:42:26 +03:00
james
8744064c6f Fix issue 23362: Permutations should be a forward range. 2022-09-23 22:39:15 +02:00
Dennis Korpel
2866acf18d Fix @system annotation in multisort unittest 2022-09-23 17:11:42 +02:00
james
bc5126469e Fix Issue 14542 - std.algorithm.searching.until does not handle range sentinels nicely 2022-09-23 16:44:42 +02:00
aG0aep6G
c6dffdcb07
fix issue 23358 - Link unusable due to space insertion 2022-09-22 12:51:09 +02:00
Ate Eskola
c8ddafd99d Came up with alternative way to avoid linking errors with DirIterator. 2022-09-22 00:30:20 +03:00
james
cd42a6a81f Style fixes. 2022-09-21 23:10:20 +02:00
james
370f14af6d Make permutations into forward range. 2022-09-21 23:00:20 +02:00
Ate Eskola
bbd03c9351 Added the needed AliasSeq import to betterC tests. 2022-09-21 23:08:14 +03:00
Paul Backus
56697c4837 Fix Issue 23350 - Nondeterministic test failure in std.concurrency
Previously, a TOCTOU bug in threadInfo could result in a null
dereference if 'scheduler' was changed to null between the evaluation of
the 'if' condition and the call to scheduler.threadInfo.
2022-09-21 00:56:58 +02:00
Iain Buclaw
352258539c Fix 'the the' typos in Phobos documentation 2022-09-20 21:31:46 +02:00
The Dlang Bot
bdf34e9021
Merge pull request #8573 from jamesragray/b16034
Fix issue 16034: map should be possible with a reference only

Signed-off-by: Paul Backus <snarwin@gmail.com>
Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2022-09-20 15:27:39 +02:00
Luís Ferreira
7bf882bfe6 chore(stdio): annotate postblit of File struct
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2022-09-20 00:50:38 +02:00
Paul Backus
d31f81ee7c Split SharedBorrowedRegion from BorrowedRegion
Since they do not present the same structural interface, they should be
separate types (i.e., hasMember cannot tell the difference between a
'shared' method and a thread-local method).
2022-09-19 16:31:20 -04:00
Paul Backus
63882e2e2d SharedRegion: don't use NullAllocator as sentinel
SharedRegion will now always assume that its ParentAllocator is a real
allocator, and attempt to use its 'allocate' and 'deallocate' methods
accordingly.

The behavior previously provided by SharedRegion!(NullAllocator, ...)
remains available via shared(BorrowedRegion!(...)).

See issue 23090 for detailed rationale.
2022-09-19 16:31:20 -04:00
Paul Backus
70d41a122a Use BorrowedRegion internally in SharedRegion 2022-09-19 16:31:20 -04:00
Paul Backus
e05ee968ac Region: don't use NullAllocator as a sentinel
Region will now always assume that its ParentAllocator is a real
allocator, and attempt to use its 'allocate' and 'deallocate' methods
accordingly.

The behavior previously provided by Region!(NullAllocator, ...) remains
available via BorrowedRegion!(...).

See issue 23090 for detailed rationale.
2022-09-19 16:31:20 -04:00
Paul Backus
e04186b82f Use BorrowedRegion internally in [InSitu]Region 2022-09-19 16:31:20 -04:00
Paul Backus
e6ebc2ad51 Add BorrowedRegion, a non-owning Region allocator
Previously, this behavior could only be obtained by instantiating Region
with NullAllocator as its ParentAllocator. Extracting it into a separate
allocator will allow Region itself to be simplified.
2022-09-19 16:31:20 -04:00
james
d2b8a15e69 Added unittest related to fix, and moved unittest related to issue to std/algorithm/iterartion.d 2022-09-19 22:27:22 +02:00
james
41959deae6 Fix issue 16034: map should be possible with a reference only 2022-09-19 16:44:10 +02:00
Iain Buclaw
bee0ae0a79 partial fix for Issue 23344 - std.stdio: error: undefined identifier fputc_unlocked
While the proper fix would be to define the missing getc/putc macros,
for now to keep the build happy, just treat uClibc as a GENERIC_IO
platform.
2022-09-19 00:01:53 +02:00
Iain Buclaw
d51e3f99a3 fix Issue 23340 - std.path: expandTilde erroneously raises onOutOfMemory on failed getpwam_r() 2022-09-19 00:00:29 +02:00
Ate Eskola
d7b6838fc2 Took copies of most SafeRefCounted unit tests for RefCounted. 2022-09-17 19:48:05 +03:00
Ate Eskola
c277df5547 Applied suggested documentation fixes. 2022-09-17 18:57:22 +03:00
Andrej Mitrovic
92a9d600d1 Fix issue 23333 - Make DList opSlice @nogc 2022-09-15 13:33:49 +02:00
Walter Bright
d284c57ecc std.conv.octal: simplify implementation 2022-09-11 23:50:28 -07:00
Steven Schveighoffer
3ea28fee2b Fix Stupid -> Snazzy based on updated name. 2022-09-11 20:37:17 +02:00
Ate Eskola
490caa7090 RefCounted -> SafeRefCounted, OldRefCounted -> RefCounted. 2022-09-11 01:35:35 +03:00
Ate Eskola
bb145a09a6 Ate's work on safe ref counted 2022-09-11 01:35:35 +03:00
Atila Neves
be598abbeb Atila's work on safe ref counted 2022-09-11 01:35:35 +03:00
Martin Nowak
85d0520220 Merge remote-tracking branch 'upstream/stable' into merge_stable 2022-09-10 15:23:06 +02:00
Paul Backus
e26aaeb767 Remove SumType's invariant
According to earlier versions of the language spec, checking the
invariant of a struct would also cause its fields' invariants to be
checked, recursively. SumType's invariant was added to make SumType
behave consistently with other structs in this regard.

The spec, however, was wrong: invariants of struct fields are not
checked unless the field is accessed directly, and never have been.
Thus, to make SumType behave consistently with other structs, its
invariant must be removed.

This change should not break any valid programs, since code that relies
on the failure of an invariant has undefined behavior per the spec.

Spec correction PR: https://github.com/dlang/dlang.org/pull/3405
2022-09-04 23:40:03 -04:00
Robert burner Schadek
34ad2148db std.logger.core unittest forgotton thread.join
no more sleep
2022-09-05 01:08:16 +02:00
Paul Backus
5b8749ca7c Fix issue 23324 - Incorrect source link in std.format docs 2022-09-05 00:26:06 +02:00