1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: v.ast.byte_type -> v.ast.u8_type (#14964)

This commit is contained in:
zakuro
2022-07-06 19:32:30 +09:00
committed by GitHub
parent 00dfce655e
commit a46bcf3571
19 changed files with 46 additions and 50 deletions

View File

@ -184,7 +184,7 @@ fn pg_stmt_match(mut types []u32, mut vals []&char, mut lens []int, mut formats
fn pg_type_from_v(typ int) ?string {
str := match typ {
orm.type_idx['i8'], orm.type_idx['i16'], orm.type_idx['byte'], orm.type_idx['u16'] {
orm.type_idx['i8'], orm.type_idx['i16'], orm.type_idx['u8'], orm.type_idx['u16'] {
'SMALLINT'
}
orm.type_idx['bool'] {
@ -240,8 +240,8 @@ fn str_to_primitive(str string, typ int) ?orm.Primitive {
orm.type_idx['i64'] {
return orm.Primitive(str.i64())
}
// byte
orm.type_idx['byte'] {
// u8
orm.type_idx['u8'] {
data := str.i8()
return orm.Primitive(*unsafe { &u8(&data) })
}