andrey Tue, 28 Sep 2010 14:36:18 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303828
Log: add another hook, maybe the last one, for MYSQLND_STMT, which was missed before Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h U php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c 2010-09-28 14:35:37 UTC (rev 303827) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c 2010-09-28 14:36:18 UTC (rev 303828) @@ -52,8 +52,6 @@ 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_internal_free_stmt_content(MYSQLND_STMT * const stmt TSRMLS_DC); - /* {{{ mysqlnd_stmt::store_result */ static MYSQLND_RES * MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s TSRMLS_DC) @@ -228,7 +226,7 @@ } /* Free space for next result */ - mysqlnd_internal_free_stmt_content(s TSRMLS_CC); + s->m->free_stmt_content(s TSRMLS_CC); DBG_RETURN(s->m->parse_execute_response(s TSRMLS_CC)); } @@ -2062,12 +2060,12 @@ /* }}} */ -/* {{{ mysqlnd_internal_free_stmt_content */ +/* {{{ mysqlnd_stmt::free_stmt_content */ static void -mysqlnd_internal_free_stmt_content(MYSQLND_STMT * const s TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content)(MYSQLND_STMT * const s TSRMLS_DC) { MYSQLND_STMT_DATA * stmt = s? s->data:NULL; - DBG_ENTER("mysqlnd_internal_free_stmt_content"); + DBG_ENTER("mysqlnd_stmt::free_stmt_content"); if (!stmt) { DBG_VOID_RETURN; } @@ -2186,7 +2184,7 @@ stmt->execute_cmd_buffer.buffer = NULL; } - mysqlnd_internal_free_stmt_content(s TSRMLS_CC); + s->m->free_stmt_content(s TSRMLS_CC); if (stmt->conn) { stmt->conn->m->free_reference(stmt->conn TSRMLS_CC); @@ -2324,7 +2322,8 @@ MYSQLND_METHOD(mysqlnd_stmt, free_result_bind), MYSQLND_METHOD(mysqlnd_stmt, server_status), mysqlnd_stmt_execute_generate_request, - mysqlnd_stmt_execute_parse_response + mysqlnd_stmt_execute_parse_response, + MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content) MYSQLND_CLASS_METHODS_END; Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h =================================================================== --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2010-09-28 14:35:37 UTC (rev 303827) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2010-09-28 14:36:18 UTC (rev 303828) @@ -627,6 +627,7 @@ typedef unsigned int (*func_mysqlnd_stmt__server_status)(const MYSQLND_STMT * const stmt TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_stmt__generate_execute_request)(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC); 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); struct st_mysqlnd_stmt_methods { @@ -678,6 +679,8 @@ func_mysqlnd_stmt__generate_execute_request generate_execute_request; func_mysqlnd_stmt__parse_execute_response parse_execute_response; + + func_mysqlnd_stmt__free_stmt_content free_stmt_content; }; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c 2010-09-28 14:35:37 UTC (rev 303827) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c 2010-09-28 14:36:18 UTC (rev 303828) @@ -52,8 +52,6 @@ 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_internal_free_stmt_content(MYSQLND_STMT * const stmt TSRMLS_DC); - /* {{{ mysqlnd_stmt::store_result */ static MYSQLND_RES * MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s TSRMLS_DC) @@ -228,7 +226,7 @@ } /* Free space for next result */ - mysqlnd_internal_free_stmt_content(s TSRMLS_CC); + s->m->free_stmt_content(s TSRMLS_CC); DBG_RETURN(s->m->parse_execute_response(s TSRMLS_CC)); } @@ -2062,12 +2060,12 @@ /* }}} */ -/* {{{ mysqlnd_internal_free_stmt_content */ +/* {{{ mysqlnd_stmt::free_stmt_content */ static void -mysqlnd_internal_free_stmt_content(MYSQLND_STMT * const s TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content)(MYSQLND_STMT * const s TSRMLS_DC) { MYSQLND_STMT_DATA * stmt = s? s->data:NULL; - DBG_ENTER("mysqlnd_internal_free_stmt_content"); + DBG_ENTER("mysqlnd_stmt::free_stmt_content"); if (!stmt) { DBG_VOID_RETURN; } @@ -2186,7 +2184,7 @@ stmt->execute_cmd_buffer.buffer = NULL; } - mysqlnd_internal_free_stmt_content(s TSRMLS_CC); + s->m->free_stmt_content(s TSRMLS_CC); if (stmt->conn) { stmt->conn->m->free_reference(stmt->conn TSRMLS_CC); @@ -2324,7 +2322,8 @@ MYSQLND_METHOD(mysqlnd_stmt, free_result_bind), MYSQLND_METHOD(mysqlnd_stmt, server_status), mysqlnd_stmt_execute_generate_request, - mysqlnd_stmt_execute_parse_response + mysqlnd_stmt_execute_parse_response, + MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content) MYSQLND_CLASS_METHODS_END; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2010-09-28 14:35:37 UTC (rev 303827) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2010-09-28 14:36:18 UTC (rev 303828) @@ -627,6 +627,7 @@ typedef unsigned int (*func_mysqlnd_stmt__server_status)(const MYSQLND_STMT * const stmt TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_stmt__generate_execute_request)(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC); 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); struct st_mysqlnd_stmt_methods { @@ -678,6 +679,8 @@ func_mysqlnd_stmt__generate_execute_request generate_execute_request; func_mysqlnd_stmt__parse_execute_response parse_execute_response; + + func_mysqlnd_stmt__free_stmt_content free_stmt_content; };
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php