mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
change to use c str literal
This commit is contained in:
1 parent
582a4ab267
commit
6a6af6a952
1 file changed
+2
-2
@@ -1026,7 +1026,7 @@ mod _sqlite {
|
||||
name_cstring = name.to_cstring(vm)?;
|
||||
name_cstring.as_ptr()
|
||||
} else {
|
||||
b"main\0".as_ptr().cast()
|
||||
c"main".as_ptr().cast()
|
||||
};
|
||||
|
||||
let sleep_ms = (sleep * 1000.0) as c_int;
|
||||
@@ -1035,7 +1035,7 @@ mod _sqlite {
|
||||
let target_db = target.db_lock(vm)?;
|
||||
|
||||
let handle = unsafe {
|
||||
sqlite3_backup_init(target_db.db, b"main\0".as_ptr().cast(), db.db, name_ptr)
|
||||
sqlite3_backup_init(target_db.db, c"main".as_ptr().cast(), db.db, name_ptr)
|
||||
};
|
||||
|
||||
if handle.is_null() {
|
||||
|
||||
Reference in new issue
Block a user