From 53564d613612129b10a9728fdee2155d167a9bcd Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Mon, 30 Jul 2018 01:10:26 +0300 Subject: [PATCH] Update the MySQL module to comply with the new StackStrF changes. --- modules/mysql/Connection.cpp | 12 ++++++------ modules/mysql/Field.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/mysql/Connection.cpp b/modules/mysql/Connection.cpp index 4ebc5fa3..c855839d 100644 --- a/modules/mysql/Connection.cpp +++ b/modules/mysql/Connection.cpp @@ -179,9 +179,9 @@ SQInteger Connection::ExecuteF(HSQUIRRELVM vm) return sq_throwerror(vm, e.what()); } // Attempt to retrieve the value from the stack as a string - StackStrF val(vm, 2, true); + StackStrF val(vm, 2); // Have we failed to retrieve the string? - if (SQ_FAILED(val.mRes)) + if (SQ_FAILED(val.Proc(true))) { return val.mRes; // Propagate the error! } @@ -246,9 +246,9 @@ SQInteger Connection::InsertF(HSQUIRRELVM vm) return sq_throwerror(vm, e.what()); } // Attempt to retrieve the value from the stack as a string - StackStrF val(vm, 2, true); + StackStrF val(vm, 2); // Have we failed to retrieve the string? - if (SQ_FAILED(val.mRes)) + if (SQ_FAILED(val.Proc(true))) { return val.mRes; // Propagate the error! } @@ -319,9 +319,9 @@ SQInteger Connection::QueryF(HSQUIRRELVM vm) return sq_throwerror(vm, e.what()); } // Attempt to retrieve the value from the stack as a string - StackStrF val(vm, 2, true); + StackStrF val(vm, 2); // Have we failed to retrieve the string? - if (SQ_FAILED(val.mRes)) + if (SQ_FAILED(val.Proc(true))) { return val.mRes; // Propagate the error! } diff --git a/modules/mysql/Field.cpp b/modules/mysql/Field.cpp index 52ce3450..d322bb48 100644 --- a/modules/mysql/Field.cpp +++ b/modules/mysql/Field.cpp @@ -211,9 +211,9 @@ void Field::SetIndex(const Object & field) case OT_STRING: { // Obtain the object from the stack as a string - const StackStrF val(vm, -1, false); + StackStrF val(vm, -1); // Validate the result - if (SQ_FAILED(val.mRes)) + if (SQ_FAILED(val.Proc(false))) { STHROWF("%s", LastErrorString(vm).c_str()); } @@ -236,9 +236,9 @@ void Field::SetIndex(const Object & field) case OT_INSTANCE: { // Obtain the object from the stack as a string - const StackStrF val(vm, -1, false); + StackStrF val(vm, -1); // Validate the result - if (SQ_FAILED(val.mRes)) + if (SQ_FAILED(val.Proc(false))) { STHROWF("%s", LastErrorString(vm).c_str()); }