From 21c452c5cdb6c65c1c9d0152640fb30f20385af2 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 15 Apr 2021 02:58:27 +0300 Subject: [PATCH] builtin: define u8 = byte alias --- examples/sokol/01_cubes/cube.v | 5 +++-- vlib/builtin/int.v | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/sokol/01_cubes/cube.v b/examples/sokol/01_cubes/cube.v index e0e3803777..8a54421526 100644 --- a/examples/sokol/01_cubes/cube.v +++ b/examples/sokol/01_cubes/cube.v @@ -39,7 +39,7 @@ mut: * Texture functions * ******************************************************************************/ -fn create_texture(w int, h int, buf &byte) C.sg_image { +fn create_texture(w int, h int, buf &u8) C.sg_image { sz := w * h * 4 mut img_desc := C.sg_image_desc{ width: w @@ -407,7 +407,8 @@ fn my_event_manager(mut ev gg.Event, mut app App) { * Main * ******************************************************************************/ -[console] // is needed for easier diagnostics on windows +// is needed for easier diagnostics on windows +[console] fn main() { // App init mut app := &App{ diff --git a/vlib/builtin/int.v b/vlib/builtin/int.v index f497ed041b..a3a4653afb 100644 --- a/vlib/builtin/int.v +++ b/vlib/builtin/int.v @@ -3,6 +3,8 @@ // that can be found in the LICENSE file. module builtin +type u8 = byte + /* // old function for reference pub fn (nn int) str1() string {