fix(tvix): Partially revert "eliminate exposed global variable"

This reverts part of commit 976a36c2e4,
which was causing scanForReferences to hang indefinitely. I'm not sure
what the original intent of the commit was since there's not really much
of a commit message on it, but with this I am able to fully realise
derivations.

Change-Id: I620e892e2fe2244f066512286b086b3dd8f8f6c0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1635
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
This commit is contained in:
Griffin Smith 2020-08-03 22:13:40 -04:00 committed by glittershark
parent 94387dbc25
commit e634e27577
3 changed files with 39 additions and 21 deletions

View file

@ -104,9 +104,6 @@ bool Hash::IsValidBase16(absl::string_view s) {
return true;
}
// omitted: E O U T
constexpr char base32Chars[] = "0123456789abcdfghijklmnpqrsvwxyz";
constexpr signed char kUnBase32[] = {
-1, -1, -1, -1, -1, -1, -1, -1, /* unprintables */
-1, -1, -1, -1, -1, -1, -1, -1, /* unprintables */

View file

@ -21,6 +21,9 @@ const int sha1HashSize = 20;
const int sha256HashSize = 32;
const int sha512HashSize = 64;
// omitted: E O U T
constexpr char base32Chars[] = "0123456789abcdfghijklmnpqrsvwxyz";
enum Base : int { Base64, Base32, Base16, SRI };
struct Hash {