summaryrefslogtreecommitdiff
path: root/ext/mysqli
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-04-24 18:28:29 +0300
committerDmitry Stogov <dmitry@zend.com>2019-04-24 18:28:29 +0300
commite188e4170fcc3e3a2d9ab57f3d3d24c4b26dd4bd (patch)
treebc2ece4c5f05fccda1ec1d528daef7ae4a9fb811 /ext/mysqli
parenteef351b7c76675a3bfab4f7fbab021326d6c6135 (diff)
downloadphp-git-e188e4170fcc3e3a2d9ab57f3d3d24c4b26dd4bd.tar.gz
Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference
Diffstat (limited to 'ext/mysqli')
-rw-r--r--ext/mysqli/mysqli_api.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 604b4b672d..1a7303c987 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -992,16 +992,16 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
} while (--j > 0);
tmp[10]= '\0';
/* unsigned int > INT_MAX is 10 digits - ALWAYS */
- ZEND_TRY_ASSIGN_STRINGL(result, tmp, 10);
+ ZEND_TRY_ASSIGN_REF_STRINGL(result, tmp, 10);
efree(tmp);
break;
}
#endif
}
if (stmt->stmt->fields[i].flags & UNSIGNED_FLAG) {
- ZEND_TRY_ASSIGN_LONG(result, *(unsigned int *)stmt->result.buf[i].val);
+ ZEND_TRY_ASSIGN_REF_LONG(result, *(unsigned int *)stmt->result.buf[i].val);
} else {
- ZEND_TRY_ASSIGN_LONG(result, *(int *)stmt->result.buf[i].val);
+ ZEND_TRY_ASSIGN_REF_LONG(result, *(int *)stmt->result.buf[i].val);
}
break;
case IS_DOUBLE:
@@ -1018,7 +1018,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
dval = *((double *)stmt->result.buf[i].val);
}
- ZEND_TRY_ASSIGN_DOUBLE(result, dval);
+ ZEND_TRY_ASSIGN_REF_DOUBLE(result, dval);
break;
}
case IS_STRING:
@@ -1059,20 +1059,20 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
* use MYSQLI_LL_SPEC.
*/
snprintf(tmp, sizeof(tmp), (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval);
- ZEND_TRY_ASSIGN_STRING(result, tmp);
+ ZEND_TRY_ASSIGN_REF_STRING(result, tmp);
} else {
- ZEND_TRY_ASSIGN_LONG(result, llval);
+ ZEND_TRY_ASSIGN_REF_LONG(result, llval);
}
} else {
#if defined(MYSQL_DATA_TRUNCATED) && MYSQL_VERSION_ID > 50002
if (ret == MYSQL_DATA_TRUNCATED && *(stmt->stmt->bind[i].error) != 0) {
/* result was truncated */
- ZEND_TRY_ASSIGN_STRINGL(result, stmt->result.buf[i].val, stmt->stmt->bind[i].buffer_length);
+ ZEND_TRY_ASSIGN_REF_STRINGL(result, stmt->result.buf[i].val, stmt->stmt->bind[i].buffer_length);
} else {
#else
{
#endif
- ZEND_TRY_ASSIGN_STRINGL(result, stmt->result.buf[i].val, stmt->result.buf[i].output_len);
+ ZEND_TRY_ASSIGN_REF_STRINGL(result, stmt->result.buf[i].val, stmt->result.buf[i].output_len);
}
}
break;
@@ -1080,7 +1080,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
break;
}
} else {
- ZEND_TRY_ASSIGN_NULL(result);
+ ZEND_TRY_REF_ASSIGN_NULL(result);
}
}
} else {