summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_ps.h
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2015-11-10 16:59:34 +0100
committerAndrey Hristov <andrey@php.net>2015-11-12 16:19:16 +0100
commitc24d452f6046b5d1b415aa0438ef71fa35ae843f (patch)
treeab5966c5a6cb18dec2e1898d4aacee5b1f5871d8 /ext/mysqlnd/mysqlnd_ps.h
parent94ce013bff1e81b218bbb4100cd3267e23f90158 (diff)
downloadphp-git-c24d452f6046b5d1b415aa0438ef71fa35ae843f.tar.gz
MNDR:
- less dereferencing in mysqlnd_ps . Dereference stmt->conn only once and use a stack variable. Also make the source cleaner.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps.h')
-rw-r--r--ext/mysqlnd/mysqlnd_ps.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps.h b/ext/mysqlnd/mysqlnd_ps.h
index 801de6db10..3a1092b977 100644
--- a/ext/mysqlnd/mysqlnd_ps.h
+++ b/ext/mysqlnd/mysqlnd_ps.h
@@ -21,7 +21,8 @@
#define MYSQLND_PS_H
/* PS stuff */
-typedef void (*ps_field_fetch_func)(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row);
+typedef void (*ps_field_fetch_func)(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row);
+
struct st_mysqlnd_perm_bind {
ps_field_fetch_func func;
/* should be signed int */
@@ -33,13 +34,13 @@ struct st_mysqlnd_perm_bind {
extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1];
-enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, unsigned int flags, zend_bool * fetched_anything);
-enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int flags, zend_bool * fetched_anything);
+enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything);
+enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything);
void _mysqlnd_init_ps_subsystem();/* This one is private, mysqlnd_library_init() will call it */
void _mysqlnd_init_ps_fetch_subsystem();
-void ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row, unsigned int byte_count);
+void ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row, unsigned int byte_count);
#endif /* MYSQLND_PS_H */