Commit Graph

7 Commits

Author SHA1 Message Date
Shawn Landden
cbd42e44d6 rb: fix rb.Node.getLast() that never worked 2020-01-30 12:05:57 -05:00
Shawn Landden
ad15a73240 rb: type Tree.sort with SortError 2020-01-19 23:35:56 +04:00
Shawn Landden
4ab9678b95 rb: add sort() that re-sorts tree with new compare function
You can also specify the same compare function, but after updating the
context that the function will use (connected to the rb.Tree) before.
2020-01-19 22:10:21 +04:00
Shawn Landden
e190082922 rb: *breaking* make API thread-safe
use @fieldParentPtr to access your context fields, which lie if you
struct that contains a rb.Tree member (without a pointer).

Also simplifies the init() function so rb.Tree can be initialized in a single line,
without having to use "undefined".
2020-01-19 22:09:56 +04:00
Shawn Landden
de07ca77e7 rb: just use @include("std")
we already have to use --override-std-dir
when running std tests, and having it this way
makes it much easier to run just the tests of this file.
2020-01-19 22:05:38 +04:00
Andrew Kelley
5575e2a168
std.mem.compare: breaking API changes
* `std.mem.Compare` is now `std.math.Order` and the enum tags
   renamed to follow new style convention.
 * `std.mem.compare` is renamed to `std.mem.order`.
 * new function `std.math.order`
2020-01-01 18:08:40 -05:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00