Skip to content

Commit 0a7e08d

Browse files
committed
MNDR:
- cleanup in mysqlnd_result.c - switch from zend_ulong to size_t for lengths. Accordingly change mysqli and pdo_mysql for this.
1 parent abc8c00 commit 0a7e08d

File tree

5 files changed

+119
-105
lines changed

5 files changed

+119
-105
lines changed

ext/mysqli/mysqli_api.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,11 @@ PHP_FUNCTION(mysqli_fetch_lengths)
12671267
MYSQL_RES *result;
12681268
zval *mysql_result;
12691269
unsigned int i;
1270-
zend_ulong *ret;
1270+
#if defined(MYSQLI_USE_MYSQLND)
1271+
const size_t *ret;
1272+
#else
1273+
const zend_ulong *ret;
1274+
#endif
12711275

12721276
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) {
12731277
return;

ext/mysqli/mysqli_prop.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
| Author: Georg Richter <georg@php.net> |
1616
| Andrey Hristov <andrey@php.net> |
1717
+----------------------------------------------------------------------+
18-
19-
$Id$
2018
*/
2119

2220
#ifdef HAVE_CONFIG_H
@@ -289,7 +287,11 @@ static zval *result_type_read(mysqli_object *obj, zval *retval)
289287
static zval *result_lengths_read(mysqli_object *obj, zval *retval)
290288
{
291289
MYSQL_RES *p;
292-
zend_ulong *ret;
290+
#if defined(MYSQLI_USE_MYSQLND)
291+
const size_t *ret;
292+
#else
293+
const zend_ulong *ret;
294+
#endif
293295
uint field_count;
294296

295297
CHECK_STATUS(MYSQLI_STATUS_VALID);

0 commit comments

Comments
 (0)