mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Fixes old syntax and make Row.vals mutable
- Replace `*` by `&` for C code - Make `Row.vals` mutable. Otherwise line 56 will raise error.
This commit is contained in:
parent
b6ebe0828d
commit
92b634de7c
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user