From 10e02e92b9e1b8585ede5b87de909f3ba96199f3 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 7 Oct 2023 20:32:58 +0300 Subject: [PATCH] cgen: use int32_t in cheaders.v --- vlib/v/ast/types.v | 1 + vlib/v/gen/c/cheaders.v | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/v/ast/types.v b/vlib/v/ast/types.v index de80c805abdca7..6e3211a6c6990f 100644 --- a/vlib/v/ast/types.v +++ b/vlib/v/ast/types.v @@ -921,6 +921,7 @@ pub fn (mut t Table) register_builtin_type_symbols() { t.register_sym(kind: .charptr, name: 'charptr', cname: 'charptr', mod: 'builtin') t.register_sym(kind: .i8, name: 'i8', cname: 'i8', mod: 'builtin') t.register_sym(kind: .i16, name: 'i16', cname: 'i16', mod: 'builtin') + // t.register_sym(kind: .i64, name: 'i32', cname: 'i32', mod: 'builtin') t.register_sym(kind: .int, name: 'int', cname: int_type_name, mod: 'builtin') t.register_sym(kind: .i64, name: 'i64', cname: 'i64', mod: 'builtin') t.register_sym(kind: .isize, name: 'isize', cname: 'isize', mod: 'builtin') diff --git a/vlib/v/gen/c/cheaders.v b/vlib/v/gen/c/cheaders.v index 450722cfeb30dc..debdc0a31a1e4c 100644 --- a/vlib/v/gen/c/cheaders.v +++ b/vlib/v/gen/c/cheaders.v @@ -640,7 +640,7 @@ typedef uint32_t u32; typedef uint8_t u8; typedef uint16_t u16; typedef u8 byte; -typedef int i32; +typedef int32_t i32; typedef uint32_t rune; typedef size_t usize; typedef ptrdiff_t isize;