From b2baabbdf12ae06e793aad8f9fffcfd6d2cd4fcd Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Thu, 16 Jul 2020 20:46:18 +0900 Subject: [PATCH] Fix compilation errors with vc10 caused by the previous commit. --- connection.c | 4 +++- statement.c | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/connection.c b/connection.c index 390832e..070e043 100644 --- a/connection.c +++ b/connection.c @@ -2340,7 +2340,9 @@ MYLOG(DETAIL_LOG_LEVEL, " ignored abort_on_conn\n"); if (retres) QR_set_conn(retres, self); - return (QResultHold) {retres, res}; + rhold.first = retres; + rhold.last = res; + return rhold; } #define MAX_SEND_FUNC_ARGS 3 diff --git a/statement.c b/statement.c index 721f7fe..9e5b411 100644 --- a/statement.c +++ b/statement.c @@ -378,7 +378,7 @@ SC_Constructor(ConnectionClass *conn) { rv->hdbc = conn; rv->phstmt = NULL; - rv->rhold = (QResultHold) {0}; + rv->rhold.first = rv->rhold.last = NULL; rv->curres = NULL; rv->catalog_result = FALSE; rv->prepare = NON_PREPARE_STATEMENT; @@ -528,7 +528,7 @@ SC_Destructor(StatementClass *self) void SC_init_Result(StatementClass *self) { - self->rhold = (QResultHold) {0}; + self->rhold.first = self->rhold.last = NULL; self->curres = NULL; self->curr_param_result = 0; MYLOG(0, "leaving(%p)\n", self); @@ -546,7 +546,8 @@ SC_set_Result(StatementClass *self, QResultClass *first) for (res = first; res; res = QR_nextr(res)) last = res; self->curres = first; - self->rhold = (QResultHold) {first, last}; + self->rhold.first = first; + self->rhold.last = last; if (NULL != first) self->curr_param_result = 1; } @@ -2017,7 +2018,7 @@ SC_execute(StatementClass *self) } goto cleanup; } - rhold = (QResultHold) {first, first}; + rhold.first = rhold.last = first; } else if (isSelectType) { -- 2.39.5