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

all: byte => u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 14:58:56 +03:00
parent b49d873217
commit d4a0d6f73c
221 changed files with 1365 additions and 1365 deletions

View File

@ -159,8 +159,8 @@ pub fn (db DB) q_string(query string) string {
C.sqlite3_prepare_v2(db.conn, &char(query.str), query.len, &stmt, 0)
C.sqlite3_step(stmt)
val := unsafe { &byte(C.sqlite3_column_text(stmt, 0)) }
return if val != &byte(0) { unsafe { tos_clone(val) } } else { '' }
val := unsafe { &u8(C.sqlite3_column_text(stmt, 0)) }
return if val != &u8(0) { unsafe { tos_clone(val) } } else { '' }
}
// Execute the query on db, return an array of all the results, alongside any result code.
@ -180,8 +180,8 @@ pub fn (db DB) exec(query string) ([]Row, int) {
}
mut row := Row{}
for i in 0 .. nr_cols {
val := unsafe { &byte(C.sqlite3_column_text(stmt, i)) }
if val == &byte(0) {
val := unsafe { &u8(C.sqlite3_column_text(stmt, i)) }
if val == &u8(0) {
row.vals << ''
} else {
row.vals << unsafe { tos_clone(val) }