diff --git a/vlib/crypto/rc4/rc4.v b/vlib/crypto/rc4/rc4.v index f05aac8964..74f949970a 100644 --- a/vlib/crypto/rc4/rc4.v +++ b/vlib/crypto/rc4/rc4.v @@ -16,8 +16,8 @@ import crypto.internal.subtle struct Cipher { mut: s []u32 - i byte - j byte + i u8 + j u8 } // new_cipher creates and returns a new Cipher. The key argument should be the diff --git a/vlib/mysql/stmt.c.v b/vlib/mysql/stmt.c.v index cef2ec1517..97ea72674f 100644 --- a/vlib/mysql/stmt.c.v +++ b/vlib/mysql/stmt.c.v @@ -153,6 +153,10 @@ pub fn (mut stmt Stmt) bind_bool(b &bool) { stmt.bind(mysql.mysql_type_tiny, b, 0) } +pub fn (mut stmt Stmt) bind_byte(b &byte) { + stmt.bind(mysql.mysql_type_tiny, b, 0) +} + pub fn (mut stmt Stmt) bind_u8(b &u8) { stmt.bind(mysql.mysql_type_tiny, b, 0) } diff --git a/vlib/strings/builder.c.v b/vlib/strings/builder.c.v index 29a0609d6e..35f35b5124 100644 --- a/vlib/strings/builder.c.v +++ b/vlib/strings/builder.c.v @@ -60,6 +60,11 @@ pub fn (mut b Builder) write_u8(data u8) { b << data } +// write_byte appends a single `data` byte to the accumulated buffer +pub fn (mut b Builder) write_byte(data byte) { + b << data +} + // write implements the Writer interface pub fn (mut b Builder) write(data []u8) ?int { if data.len == 0 { diff --git a/vlib/strings/builder.js.v b/vlib/strings/builder.js.v index bea3db6890..3340582589 100644 --- a/vlib/strings/builder.js.v +++ b/vlib/strings/builder.js.v @@ -23,6 +23,10 @@ pub fn (mut b Builder) write_b(data u8) { b << data } +pub fn (mut b Builder) write_byte(data byte) { + b << data +} + pub fn (mut b Builder) write_u8(data u8) { b << data }