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

mysql: make compile

This commit is contained in:
Don Alfons Nisnoni 2019-09-26 08:18:26 +08:00 committed by Alexander Medvednikov
parent 33df5edc08
commit b1f0df0fd1

View File

@ -12,7 +12,7 @@ struct Result {
} }
struct Row { struct Row {
pub: pub mut:
vals []string vals []string
} }
@ -27,7 +27,7 @@ fn C.mysql_query(mysql *C.MYSQL, q byteptr) int
fn C.mysql_error(mysql *C.MYSQL) byteptr fn C.mysql_error(mysql *C.MYSQL) byteptr
fn C.mysql_num_fields(res *C.MYSQL_RES) int fn C.mysql_num_fields(res *C.MYSQL_RES) int
fn C.mysql_store_result(mysql *C.MYSQL) *C.MYSQL_RES fn C.mysql_store_result(mysql *C.MYSQL) *C.MYSQL_RES
fn C.mysql_fetch_row(res *C.MYSQL_RES) *byteptr fn C.mysql_fetch_row(res *C.MYSQL_RES) &byteptr
fn C.mysql_free_result(res *C.MYSQL_RES) fn C.mysql_free_result(res *C.MYSQL_RES)
fn C.mysql_close(sock *C.MYSQL) fn C.mysql_close(sock *C.MYSQL)
@ -62,7 +62,7 @@ pub fn (db DB) close() {
C.mysql_close(db.conn) C.mysql_close(db.conn)
} }
pub fn (r Result) fetch_row() *byteptr { pub fn (r Result) fetch_row() &byteptr {
return C.mysql_fetch_row(r.result) return C.mysql_fetch_row(r.result)
} }