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
parent
b6ebe0828d
commit
92b634de7c
|
@ -10,11 +10,11 @@ import time
|
|||
|
||||
struct DB {
|
||||
mut:
|
||||
conn *C.PGconn
|
||||
conn &C.PGconn
|
||||
}
|
||||
|
||||
struct Row {
|
||||
pub:
|
||||
pub mut:
|
||||
vals []string
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ pub:
|
|||
dbname string
|
||||
}
|
||||
|
||||
fn C.PQconnectdb(a byteptr) *C.PGconn
|
||||
fn C.PQconnectdb(a byteptr) &C.PGconn
|
||||
fn C.PQerrorMessage(voidptr) byteptr
|
||||
fn C.PQgetvalue(voidptr, int, int) byteptr
|
||||
fn C.PQstatus(voidptr) int
|
||||
|
|
Loading…
Reference in New Issue