Skip to content

Commit 21c452c

Browse files
committed
builtin: define u8 = byte alias
1 parent 546dc91 commit 21c452c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/sokol/01_cubes/cube.v

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ mut:
3939
* Texture functions
4040
*
4141
******************************************************************************/
42-
fn create_texture(w int, h int, buf &byte) C.sg_image {
42+
fn create_texture(w int, h int, buf &u8) C.sg_image {
4343
sz := w * h * 4
4444
mut img_desc := C.sg_image_desc{
4545
width: w
@@ -407,7 +407,8 @@ fn my_event_manager(mut ev gg.Event, mut app App) {
407407
* Main
408408
*
409409
******************************************************************************/
410-
[console] // is needed for easier diagnostics on windows
410+
// is needed for easier diagnostics on windows
411+
[console]
411412
fn main() {
412413
// App init
413414
mut app := &App{

vlib/builtin/int.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// that can be found in the LICENSE file.
44
module builtin
55

6+
type u8 = byte
7+
68
/*
79
// old function for reference
810
pub fn (nn int) str1() string {

0 commit comments

Comments
 (0)