diff options
author | Andrey Hristov <andrey@php.net> | 2011-10-25 23:01:49 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2011-10-25 23:01:49 +0000 |
commit | 845d8fa10c30f68acf425e20a69d3f33fc565e41 (patch) | |
tree | de8a39dbc4aad0c5cd72cf687de48929132dac80 /ext/mysqlnd/mysqlnd_ps_codec.c | |
parent | 5e8bcbb08ac9b63ec33a69638ea6517a05a66bb6 (diff) | |
download | php-git-845d8fa10c30f68acf425e20a69d3f33fc565e41.tar.gz |
Move from directly referencing an aggregated structure to using a
pointer to a structure. The structure is still aggregated but we add
a level of indirection for possible plugins to overwrite the storage
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps_codec.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_ps_codec.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 22a78045e5..f4c7cd69cc 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -12,9 +12,9 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Authors: Georg Richter <georg@mysql.com> | - | Andrey Hristov <andrey@mysql.com> | + | Authors: Andrey Hristov <andrey@mysql.com> | | Ulf Wendel <uwendel@mysql.com> | + | Georg Richter <georg@mysql.com> | +----------------------------------------------------------------------+ */ @@ -608,7 +608,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar *buf_len = offset + null_count + 20; tmp_buf = mnd_emalloc(*buf_len); if (!tmp_buf) { - SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(*stmt->error_info); goto end; } memcpy(tmp_buf, *buf, offset); @@ -642,7 +642,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar if (Z_TYPE_P(stmt->param_bind[i].zv) != IS_LONG && PASS != mysqlnd_stmt_copy_it(&copies, stmt->param_bind[i].zv, stmt->param_count, i TSRMLS_CC)) { - SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(*stmt->error_info); goto end; } /* @@ -670,7 +670,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar *buf_len = offset + stmt->param_count * 2 + 20; tmp_buf = mnd_emalloc(*buf_len); if (!tmp_buf) { - SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(*stmt->error_info); goto end; } memcpy(tmp_buf, *buf, offset); @@ -733,7 +733,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar /* Double binding of the same zval, make a copy */ if (!copies || !copies[i]) { if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { - SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(*stmt->error_info); goto end; } } @@ -747,7 +747,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar if (Z_TYPE_P(the_var) != IS_DOUBLE) { if (!copies || !copies[i]) { if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { - SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(*stmt->error_info); goto end; } } @@ -794,7 +794,7 @@ use_string: { if (!copies || !copies[i]) { if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { - SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(*stmt->error_info); goto end; } } @@ -819,7 +819,7 @@ use_string: *buf_len = offset + data_size + 10; /* Allocate + 10 for safety */ tmp_buf = mnd_emalloc(*buf_len); if (!tmp_buf) { - SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(*stmt->error_info); goto end; } memcpy(tmp_buf, *buf, offset); |