Fixes old syntax and make Row.vals mutable

- Replace `*` by `&` for C code
- Make `Row.vals` mutable. Otherwise line 56 will raise error.
pull/1953/head
iRedMail 2019-09-12 09:53:14 +08:00 committed by Alexander Medvednikov
parent b6ebe0828d
commit 92b634de7c
1 changed files with 3 additions and 3 deletions

View File

@ -10,11 +10,11 @@ import time
struct DB { struct DB {
mut: mut:
conn *C.PGconn conn &C.PGconn
} }
struct Row { struct Row {
pub: pub mut:
vals []string vals []string
} }
@ -28,7 +28,7 @@ pub:
dbname string dbname string
} }
fn C.PQconnectdb(a byteptr) *C.PGconn fn C.PQconnectdb(a byteptr) &C.PGconn
fn C.PQerrorMessage(voidptr) byteptr fn C.PQerrorMessage(voidptr) byteptr
fn C.PQgetvalue(voidptr, int, int) byteptr fn C.PQgetvalue(voidptr, int, int) byteptr
fn C.PQstatus(voidptr) int fn C.PQstatus(voidptr) int