mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: add [unsafe] tag to more functions: tos, string_from_wide, strings.Builder: write_bytes, free (#8766)
This commit is contained in:
@ -123,7 +123,7 @@ pub fn (db DB) q_string(query string) string {
|
||||
stmt := &C.sqlite3_stmt(0)
|
||||
C.sqlite3_prepare_v2(db.conn, query.str, -1, &stmt, 0)
|
||||
C.sqlite3_step(stmt)
|
||||
res := tos_clone(C.sqlite3_column_text(stmt, 0))
|
||||
res := unsafe { tos_clone(C.sqlite3_column_text(stmt, 0)) }
|
||||
C.sqlite3_finalize(stmt)
|
||||
return res
|
||||
}
|
||||
@ -145,7 +145,7 @@ pub fn (db DB) exec(query string) ([]Row, int) {
|
||||
}
|
||||
mut row := Row{}
|
||||
for i in 0 .. nr_cols {
|
||||
val := tos_clone(C.sqlite3_column_text(stmt, i))
|
||||
val := unsafe { tos_clone(C.sqlite3_column_text(stmt, i)) }
|
||||
row.vals << val
|
||||
}
|
||||
rows << row
|
||||
|
Reference in New Issue
Block a user