summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_warning.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-19 08:07:31 +0200
committerAnatol Belski <ab@php.net>2014-08-19 08:07:31 +0200
commit63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc (patch)
treee561a58d6e084c5e4cbdde1f84aed16cf4724383 /ext/mysqli/mysqli_warning.c
parent1e8273964fbd517a2eb9e560f9cdb4afffa0c034 (diff)
downloadphp-git-63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc.tar.gz
basic macro replacements, all at once
Diffstat (limited to 'ext/mysqli/mysqli_warning.c')
-rw-r--r--ext/mysqli/mysqli_warning.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c
index afcc05c16f..3c86bee800 100644
--- a/ext/mysqli/mysqli_warning.c
+++ b/ext/mysqli/mysqli_warning.c
@@ -108,7 +108,7 @@ MYSQLI_WARNING *php_new_warning(const zval * reason, int errorno TSRMLS_DC)
ZVAL_DUP(&w->reason, (zval *)reason);
convert_to_string(&w->reason);
- //????ZVAL_UTF8_STRINGL(&(w->reason), Z_STRVAL(w->reason), Z_STRLEN(w->reason), ZSTR_AUTOFREE);
+ //????ZVAL_UTF8_STRINGL(&(w->reason), Z_STRVAL(w->reason), Z_STRSIZE(w->reason), ZSTR_AUTOFREE);
ZVAL_UTF8_STRINGL(&(w->sqlstate), "HY000", sizeof("HY000") - 1, ZSTR_DUPLICATE);
@@ -146,8 +146,8 @@ MYSQLI_WARNING * php_get_warnings(MYSQLND_CONN_DATA * mysql TSRMLS_DC)
/* 1. Here comes the error no */
entry = zend_hash_get_current_data(Z_ARRVAL(row));
- convert_to_long_ex(entry);
- errno = Z_LVAL_P(entry);
+ convert_to_int_ex(entry);
+ errno = Z_IVAL_P(entry);
zend_hash_move_forward(Z_ARRVAL(row));
/* 2. Here comes the reason */
@@ -243,7 +243,7 @@ zval *mysqli_warning_errno(mysqli_object *obj, zval *retval TSRMLS_DC)
return NULL;
}
w = (MYSQLI_WARNING *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
- ZVAL_LONG(retval, w->errorno);
+ ZVAL_INT(retval, w->errorno);
return retval;
}
/* }}} */