mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: replace []byte with []u8
This commit is contained in:
parent
0527ac633e
commit
fb192d949b
164 changed files with 533 additions and 533 deletions
|
@ -8,7 +8,7 @@ module subtle
|
|||
// NOTE: require unsafe in future
|
||||
// any_overlap reports whether x and y share memory at any (not necessarily
|
||||
// corresponding) index. The memory beyond the slice length is ignored.
|
||||
pub fn any_overlap(x []byte, y []byte) bool {
|
||||
pub fn any_overlap(x []u8, y []u8) bool {
|
||||
// NOTE: Remember to come back to this (joe-c)
|
||||
return x.len > 0 && y.len > 0 && // &x.data[0] <= &y.data[y.len-1] &&
|
||||
// &y.data[0] <= &x.data[x.len-1]
|
||||
|
@ -21,7 +21,7 @@ pub fn any_overlap(x []byte, y []byte) bool {
|
|||
//
|
||||
// inexact_overlap can be used to implement the requirements of the crypto/cipher
|
||||
// AEAD, Block, BlockMode and Stream interfaces.
|
||||
pub fn inexact_overlap(x []byte, y []byte) bool {
|
||||
pub fn inexact_overlap(x []u8, y []u8) bool {
|
||||
if x.len == 0 || y.len == 0 || unsafe { &x[0] == &y[0] } {
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue