aboutsummaryrefslogtreecommitdiff
path: root/src/mysql.cpp
diff options
context:
space:
mode:
authorRichard Knight <q@1bpm.net>2021-07-21 22:22:01 +0100
committerRichard Knight <q@1bpm.net>2021-07-21 22:22:01 +0100
commitf71024077af151e0eeb37151fb0754e61ee9a2ea (patch)
tree89b59784cc7a0064ecd20ce783488a9522d8ff76 /src/mysql.cpp
parent1b40e87a3f54a70d4994262dd7fad4297caaeca3 (diff)
downloadcsound-sqldb-f71024077af151e0eeb37151fb0754e61ee9a2ea.tar.gz
csound-sqldb-f71024077af151e0eeb37151fb0754e61ee9a2ea.tar.bz2
csound-sqldb-f71024077af151e0eeb37151fb0754e61ee9a2ea.zip
new cmake approach
Diffstat (limited to 'src/mysql.cpp')
-rw-r--r--src/mysql.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mysql.cpp b/src/mysql.cpp
index 71ea16c..2362d60 100644
--- a/src/mysql.cpp
+++ b/src/mysql.cpp
@@ -91,7 +91,7 @@ char* MySQLConnection::ScalarString(char* sql, int row, int col) {
for (int rowIndex = 0; rowIndex <= row; rowIndex++) {
res->next();
}
- char* result = res->getString(col + 1).c_str();
+ char* result = (char*) res->getString(col + 1).c_str();
delete res;
@@ -104,13 +104,13 @@ void MySQLConnection::ToArray(mysql::ResultSet* result, csnd::Csound* csound, AR
int colNum = meta->getColumnCount();
int rowNum = result->rowsCount();
int totalResults = colNum * rowNum;
- array->sizes = csound->calloc(sizeof(int32_t) * 2);
+ array->sizes = (int32_t*) csound->calloc(sizeof(int32_t) * 2);
array->sizes[0] = rowNum;
array->sizes[1] = colNum;
array->dimensions = 2;
CS_VARIABLE *var = array->arrayType->createVariable(csound, NULL);
array->arrayMemberSize = var->memBlockSize;
- array->data = csound->calloc(var->memBlockSize * totalResults);
+ array->data = (MYFLT*) csound->calloc(var->memBlockSize * totalResults);
STRINGDAT* strings;
if (asString) {
strings = (STRINGDAT*) array->data;
@@ -123,7 +123,7 @@ void MySQLConnection::ToArray(mysql::ResultSet* result, csnd::Csound* csound, AR
colIndex = 0;
while (colIndex < colNum) {
if (asString) {
- char* item = result->getString(colIndex + 1).c_str();
+ char* item = (char*) result->getString(colIndex + 1).c_str();
strings[index].size = strlen(item) + 1;
strings[index].data = csound->strdup(item);
} else {