PlutoLang / Pluto

A superset of Lua 5.4 with a focus on general-purpose programming.
https://pluto-lang.org
MIT License
367 stars 22 forks source link

Fix `uint8_t` type missing error #940

Closed cattokomo closed 3 weeks ago

cattokomo commented 3 weeks ago

Before this patch, the compiler will produce an error of missing uint8_t

In file included from /home/komo/Projects/Pluto/src/vendor/Soup/soup/sha384.cpp:1:
In file included from /home/komo/Projects/Pluto/src/vendor/Soup/soup/sha384.hpp:3:
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:115:19: error: unknown type name 'uint8_t'
  115 |                         void getDigest(uint8_t out[T::DIGEST_BYTES]) const noexcept
      |                                        ^
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:79:5: error: unknown type name 'uint8_t'
   79 |                                 uint8_t header[T::BLOCK_BYTES];
      |                                 ^
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:108:5: error: unknown type name 'uint8_t'
  108 |                                 uint8_t buf[T::DIGEST_BYTES];
      |                                 ^
3 errors generated.
In file included from /home/komo/Projects/Pluto/src/vendor/Soup/soup/sha512.cpp:1:
In file included from /home/komo/Projects/Pluto/src/vendor/Soup/soup/sha512.hpp:3:
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:115:19: error: unknown type name 'uint8_t'
  115 |                         void getDigest(uint8_t out[T::DIGEST_BYTES]) const noexcept
      |                                        ^
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:79:5: error: unknown type name 'uint8_t'
   79 |                                 uint8_t header[T::BLOCK_BYTES];
      |                                 ^
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:108:5: error: unknown type name 'uint8_t'
  108 |                                 uint8_t buf[T::DIGEST_BYTES];
      |                                 ^
3 errors generated.
In file included from /home/komo/Projects/Pluto/src/vendor/Soup/soup/sha256.cpp:1:
In file included from /home/komo/Projects/Pluto/src/vendor/Soup/soup/sha256.hpp:3:
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:115:19: error: unknown type name 'uint8_t'
  115 |                         void getDigest(uint8_t out[T::DIGEST_BYTES]) const noexcept
      |                                        ^
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:79:5: error: unknown type name 'uint8_t'
   79 |                                 uint8_t header[T::BLOCK_BYTES];
      |                                 ^
/home/komo/Projects/Pluto/src/vendor/Soup/soup/CryptoHashAlgo.hpp:108:5: error: unknown type name 'uint8_t'
  108 |                                 uint8_t buf[T::DIGEST_BYTES];
      |                                 ^
3 errors generated.
Sainan commented 3 weeks ago

Fixed upstream: https://github.com/calamity-inc/Soup/commit/880a51ac3a19238cb909a491866bf78b41e2bbeb