mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: deprecate using V strings in C function calls (#10140)
This commit is contained in:
@@ -3506,7 +3506,7 @@ fn my_callback(arg voidptr, howmany int, cvalues &&char, cnames &&char) int {
|
||||
fn main() {
|
||||
db := &C.sqlite3(0) // this means `sqlite3* db = 0`
|
||||
// passing a string literal to a C function call results in a C string, not a V string
|
||||
C.sqlite3_open('users.db', &db)
|
||||
C.sqlite3_open(c'users.db', &db)
|
||||
// C.sqlite3_open(db_path.str, &db)
|
||||
query := 'select count(*) from users'
|
||||
stmt := &C.sqlite3_stmt(0)
|
||||
|
Reference in New Issue
Block a user