andrey Fri, 14 May 2010 15:11:56 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=299382
Log: Allow overloading of mysqlnd_result_meta_init(). Add free space for future hooks. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h U php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2010-05-14 13:41:35 UTC (rev 299381) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2010-05-14 15:11:56 UTC (rev 299382) @@ -322,7 +322,7 @@ result->meta = NULL; } - result->meta = mysqlnd_result_meta_init(result->field_count, result->persistent TSRMLS_CC); + result->meta = result->m.result_meta_init(result->field_count, result->persistent TSRMLS_CC); /* 1. Read all fields metadata */ @@ -1613,7 +1613,8 @@ MYSQLND_METHOD(mysqlnd_res, free_buffered_data), MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data), - NULL /* row_decoder */ + NULL /* row_decoder */, + mysqlnd_result_meta_init 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-05-14 13:41:35 UTC (rev 299381) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2010-05-14 15:11:56 UTC (rev 299382) @@ -277,6 +277,12 @@ func_mysqlnd_net__free_contents free_contents; func_mysqlnd_net__enable_ssl enable_ssl; func_mysqlnd_net__disable_ssl disable_ssl; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; }; @@ -318,6 +324,12 @@ func_mysqlnd_protocol__get_stats_packet get_stats_packet; func_mysqlnd_protocol__get_prepare_response_packet get_prepare_response_packet; func_mysqlnd_protocol__get_change_user_response_packet get_change_user_response_packet; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; }; @@ -507,6 +519,8 @@ zend_bool as_unicode, zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC); +typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res__result_meta_init)(unsigned int field_count, zend_bool persistent TSRMLS_DC); + struct st_mysqlnd_res_methods { mysqlnd_fetch_row_func fetch_row; @@ -541,6 +555,14 @@ /* for decoding - binary or text protocol */ func_mysqlnd_res__row_decoder row_decoder; + + func_mysqlnd_res__result_meta_init result_meta_init; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; }; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2010-05-14 13:41:35 UTC (rev 299381) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2010-05-14 15:11:56 UTC (rev 299382) @@ -322,7 +322,7 @@ result->meta = NULL; } - result->meta = mysqlnd_result_meta_init(result->field_count, result->persistent TSRMLS_CC); + result->meta = result->m.result_meta_init(result->field_count, result->persistent TSRMLS_CC); /* 1. Read all fields metadata */ @@ -1613,7 +1613,8 @@ MYSQLND_METHOD(mysqlnd_res, free_buffered_data), MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data), - NULL /* row_decoder */ + NULL /* row_decoder */, + mysqlnd_result_meta_init MYSQLND_CLASS_METHODS_END; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2010-05-14 13:41:35 UTC (rev 299381) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2010-05-14 15:11:56 UTC (rev 299382) @@ -277,6 +277,12 @@ func_mysqlnd_net__free_contents free_contents; func_mysqlnd_net__enable_ssl enable_ssl; func_mysqlnd_net__disable_ssl disable_ssl; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; }; @@ -318,6 +324,12 @@ func_mysqlnd_protocol__get_stats_packet get_stats_packet; func_mysqlnd_protocol__get_prepare_response_packet get_prepare_response_packet; func_mysqlnd_protocol__get_change_user_response_packet get_change_user_response_packet; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; }; @@ -507,6 +519,8 @@ zend_bool as_unicode, zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC); +typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res__result_meta_init)(unsigned int field_count, zend_bool persistent TSRMLS_DC); + struct st_mysqlnd_res_methods { mysqlnd_fetch_row_func fetch_row; @@ -541,6 +555,14 @@ /* for decoding - binary or text protocol */ func_mysqlnd_res__row_decoder row_decoder; + + func_mysqlnd_res__result_meta_init result_meta_init; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; };
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php