From 92b634de7c350e6214609f7c5d9da9264f08970f Mon Sep 17 00:00:00 2001 From: iRedMail <2048991+iredmail@users.noreply.github.com> Date: Thu, 12 Sep 2019 09:53:14 +0800 Subject: [PATCH] Fixes old syntax and make Row.vals mutable - Replace `*` by `&` for C code - Make `Row.vals` mutable. Otherwise line 56 will raise error. --- vlib/pg/pg.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/pg/pg.v b/vlib/pg/pg.v index bbe655474b..d8a68b8b58 100644 --- a/vlib/pg/pg.v +++ b/vlib/pg/pg.v @@ -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