From 77338b1b243486f3013fb1109d26f25b7e0249a6 Mon Sep 17 00:00:00 2001 From: Kevin Viratyosin Date: Mon, 12 Apr 2021 13:07:50 -0700 Subject: [PATCH] Mark HH\non_crypto_md5_lower/upper pure Reviewed By: oulgen Differential Revision: D27712094 fbshipit-source-id: ee2fce3953a6718507623ceb77e42a2b3bb3784b --- hphp/hack/hhi/builtins_fb.hhi | 4 ++-- hphp/runtime/ext/fb/ext_fb.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hphp/hack/hhi/builtins_fb.hhi b/hphp/hack/hhi/builtins_fb.hhi index 6784c775339..7a9da939e91 100644 --- a/hphp/hack/hhi/builtins_fb.hhi +++ b/hphp/hack/hhi/builtins_fb.hhi @@ -92,9 +92,9 @@ namespace HH { <<__PHPStdLib>> function disable_code_coverage_with_frequency(); <<__PHPStdLib>> -function non_crypto_md5_upper(string $str): int; +function non_crypto_md5_upper(string $str)[]: int; <<__PHPStdLib>> -function non_crypto_md5_lower(string $str): int; +function non_crypto_md5_lower(string $str)[]: int; /** Returns the overflow part of multiplying two ints, as if they were unsigned. * In other words, this returns the upper 64 bits of the full product of diff --git a/hphp/runtime/ext/fb/ext_fb.php b/hphp/runtime/ext/fb/ext_fb.php index beb17f65c16..0df47a50fb6 100644 --- a/hphp/runtime/ext/fb/ext_fb.php +++ b/hphp/runtime/ext/fb/ext_fb.php @@ -275,8 +275,8 @@ function disable_code_coverage_with_frequency(): darray; * The faster and quite effective xxhash64 is generally recommended for * non-crypto hashing needs when no backward compatibility is needed. */ -<<__Native, __IsFoldable, __Pure>> -function non_crypto_md5_upper(string $str): int; +<<__Native, __IsFoldable>> +function non_crypto_md5_upper(string $str)[]: int; /** Returns an int for the lower (last) 64 bits of an md5 hash of a string. * The MD5 hash, usually presented as a hex value, is taken as big endian, and @@ -291,8 +291,8 @@ function non_crypto_md5_upper(string $str): int; * The faster and quite effective xxhash64 is generally recommended for * non-crypto hashing needs when no backward compatibility is needed. */ -<<__Native, __IsFoldable, __Pure>> -function non_crypto_md5_lower(string $str): int; +<<__Native, __IsFoldable>> +function non_crypto_md5_lower(string $str)[]: int; /** Returns the overflow part of multiplying two ints, as if they were unsigned. * In other words, this returns the upper 64 bits of the full product of -- 2.11.4.GIT