mirror of
https://github.com/php/php-src.git
synced 2026-04-05 07:02:33 +02:00
Use callback structure
This commit is contained in:
@@ -42,8 +42,6 @@ enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, z
|
||||
static void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
static void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, unsigned int param_no TSRMLS_DC);
|
||||
|
||||
static void MYSQLND_METHOD(mysqlnd_stmt, free_stmt_result)(MYSQLND_STMT * const s TSRMLS_DC);
|
||||
|
||||
/* {{{ mysqlnd_stmt::store_result */
|
||||
static MYSQLND_RES *
|
||||
MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s TSRMLS_DC)
|
||||
@@ -246,7 +244,7 @@ MYSQLND_METHOD(mysqlnd_stmt, next_result)(MYSQLND_STMT * s TSRMLS_DC)
|
||||
DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status->server_status, stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS);
|
||||
|
||||
/* Free space for next result */
|
||||
MYSQLND_METHOD(mysqlnd_stmt, free_stmt_result)(s TSRMLS_CC);
|
||||
s->m->free_stmt_result(s TSRMLS_CC);
|
||||
{
|
||||
enum_func_status ret = s->m->parse_execute_response(s TSRMLS_CC);
|
||||
DBG_RETURN(ret);
|
||||
@@ -2154,7 +2152,7 @@ MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content)(MYSQLND_STMT * const s TSRMLS_DC
|
||||
stmt->param_bind = NULL;
|
||||
}
|
||||
|
||||
MYSQLND_METHOD(mysqlnd_stmt, free_stmt_result)(s TSRMLS_CC);
|
||||
s->m->free_stmt_result(s TSRMLS_CC);
|
||||
DBG_VOID_RETURN;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2373,7 +2371,8 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_stmt)
|
||||
mysqlnd_stmt_execute_generate_request,
|
||||
mysqlnd_stmt_execute_parse_response,
|
||||
MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content),
|
||||
MYSQLND_METHOD(mysqlnd_stmt, flush)
|
||||
MYSQLND_METHOD(mysqlnd_stmt, flush),
|
||||
MYSQLND_METHOD(mysqlnd_stmt, free_stmt_result)
|
||||
MYSQLND_CLASS_METHODS_END;
|
||||
|
||||
|
||||
|
||||
@@ -787,6 +787,7 @@ typedef enum_func_status (*func_mysqlnd_stmt__generate_execute_request)(MYSQLND
|
||||
typedef enum_func_status (*func_mysqlnd_stmt__parse_execute_response)(MYSQLND_STMT * const s TSRMLS_DC);
|
||||
typedef void (*func_mysqlnd_stmt__free_stmt_content)(MYSQLND_STMT * const s TSRMLS_DC);
|
||||
typedef enum_func_status (*func_mysqlnd_stmt__flush)(MYSQLND_STMT * const stmt TSRMLS_DC);
|
||||
typedef void (*func_mysqlnd_stmt__free_stmt_result)(MYSQLND_STMT * const s TSRMLS_DC);
|
||||
|
||||
struct st_mysqlnd_stmt_methods
|
||||
{
|
||||
@@ -842,6 +843,8 @@ struct st_mysqlnd_stmt_methods
|
||||
func_mysqlnd_stmt__free_stmt_content free_stmt_content;
|
||||
|
||||
func_mysqlnd_stmt__flush flush;
|
||||
|
||||
func_mysqlnd_stmt__free_stmt_result free_stmt_result;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user