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

all: wrap up unsafe { nil } (p. 3)

This commit is contained in:
Alexander Medvednikov
2022-07-21 21:01:30 +03:00
parent a68d03ac59
commit 9099594a49
51 changed files with 86 additions and 86 deletions

View File

@ -158,7 +158,7 @@ pub fn (mut conn Connection) set_option(option_type int, val voidptr) {
// get_option - return the value of an option, settable by `set_option`.
// https://dev.mysql.com/doc/c-api/5.7/en/mysql-get-option.html
pub fn (conn &Connection) get_option(option_type int) ?voidptr {
ret := voidptr(0)
ret := unsafe { nil }
if C.mysql_get_option(conn.conn, option_type, &ret) != 0 {
return error_with_code(get_error_msg(conn.conn), get_errno(conn.conn))
}