Skip to content

Commit fb1b5ab

Browse files
committed
MNDR:
- switch to MYSQLND_CLASS_METHOD_TABLE_NAME_DECL() for automatic naming of class methods
1 parent 5609eab commit fb1b5ab

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

ext/mysqlnd/mysqlnd_structs.h

+22-23
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ struct st_mysqlnd_upsert_status
116116
uint64_t affected_rows;
117117
uint64_t last_insert_id;
118118

119-
struct st_mysqlnd_upsert_status_methods *m;
119+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_upsert_status) *m;
120120
};
121121

122122

@@ -316,7 +316,7 @@ typedef func_mysqlnd_net__open_stream (*func_mysqlnd_net__get_open_stream)(MYSQL
316316
typedef void (*func_mysqlnd_net__post_connect_set_opt)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
317317
typedef enum_func_status (*func_mysqlnd_net__read_compressed_packet_from_stream_and_fill_read_buffer)(MYSQLND_NET * net, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info);
318318

319-
struct st_mysqlnd_net_methods
319+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_net)
320320
{
321321
func_mysqlnd_net__init init;
322322
func_mysqlnd_net__dtor dtor;
@@ -387,7 +387,7 @@ typedef struct st_mysqlnd_packet_chg_user_resp*(*func_mysqlnd_protocol_payload_d
387387
typedef struct st_mysqlnd_packet_sha256_pk_request *(*func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
388388
typedef struct st_mysqlnd_packet_sha256_pk_request_response *(*func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
389389

390-
struct st_mysqlnd_protocol_payload_decoder_factory_methods
390+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_protocol_payload_decoder_factory)
391391
{
392392
func_mysqlnd_protocol_payload_decoder_factory__get_mysqlnd_conn_data get_mysqlnd_conn_data;
393393
func_mysqlnd_protocol_payload_decoder_factory__get_greet_packet get_greet_packet;
@@ -412,7 +412,7 @@ struct st_mysqlnd_protocol_payload_decoder_factory_methods
412412
};
413413

414414

415-
struct st_mysqlnd_object_factory_methods;
415+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_object_factory);
416416

417417
typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(struct st_mysqlnd_object_factory_methods * factory, zend_bool persistent);
418418
typedef MYSQLND * (*func_mysqlnd_object_factory__clone_connection_object)(MYSQLND * conn);
@@ -421,7 +421,7 @@ typedef MYSQLND_NET * (*func_mysqlnd_object_factory__get_io_channel)(zend_bool p
421421
typedef MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * (*func_mysqlnd_object_factory__get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, zend_bool persistent);
422422

423423

424-
struct st_mysqlnd_object_factory_methods
424+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_object_factory)
425425
{
426426
func_mysqlnd_object_factory__get_connection get_connection;
427427
func_mysqlnd_object_factory__clone_connection_object clone_connection_object;
@@ -523,7 +523,7 @@ typedef unsigned int (*func_mysqlnd_conn_data__negotiate_client_api_capabilitie
523523
typedef unsigned int (*func_mysqlnd_conn_data__get_client_api_capabilities)(const MYSQLND_CONN_DATA * const conn);
524524

525525

526-
struct st_mysqlnd_conn_data_methods
526+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_conn_data)
527527
{
528528
func_mysqlnd_conn_data__connect connect;
529529
func_mysqlnd_conn_data__escape_string escape_string;
@@ -623,7 +623,7 @@ typedef MYSQLND * (*func_mysqlnd_conn__clone_object)(MYSQLND * const conn);
623623
typedef void (*func_mysqlnd_conn__dtor)(MYSQLND * conn);
624624
typedef enum_func_status (*func_mysqlnd_conn__close)(MYSQLND * conn, enum_connection_close_type close_type);
625625

626-
struct st_mysqlnd_conn_methods
626+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_conn)
627627
{
628628
func_mysqlnd_data__connect connect;
629629
func_mysqlnd_conn__clone_object clone_object;
@@ -667,7 +667,7 @@ typedef void (*func_mysqlnd_res__unbuffered_free_last_data)(MYSQLND_RES *resu
667667

668668
typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res__result_meta_init)(unsigned int field_count, zend_bool persistent);
669669

670-
struct st_mysqlnd_res_methods
670+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_res)
671671
{
672672
mysqlnd_fetch_row_func fetch_row;
673673

@@ -709,7 +709,7 @@ typedef zend_ulong * (*func_mysqlnd_result_unbuffered__fetch_lengths)(MYSQLND_R
709709
typedef void (*func_mysqlnd_result_unbuffered__free_last_data)(MYSQLND_RES_UNBUFFERED * result, MYSQLND_STATS * const global_stats);
710710
typedef void (*func_mysqlnd_result_unbuffered__free_result)(MYSQLND_RES_UNBUFFERED * const result, MYSQLND_STATS * const global_stats);
711711

712-
struct st_mysqlnd_result_unbuffered_methods
712+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_result_unbuffered)
713713
{
714714
mysqlnd_fetch_row_func fetch_row;
715715
func_mysqlnd_res__row_decoder row_decoder;
@@ -726,7 +726,7 @@ typedef zend_ulong * (*func_mysqlnd_result_buffered__fetch_lengths)(MYSQLND_RES
726726
typedef enum_func_status (*func_mysqlnd_result_buffered__data_seek)(MYSQLND_RES_BUFFERED * const result, const uint64_t row);
727727
typedef void (*func_mysqlnd_result_buffered__free_result)(MYSQLND_RES_BUFFERED * const result);
728728

729-
struct st_mysqlnd_result_buffered_methods
729+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_result_buffered)
730730
{
731731
mysqlnd_fetch_row_func fetch_row;
732732
func_mysqlnd_res__row_decoder row_decoder;
@@ -747,7 +747,7 @@ typedef enum_func_status (*func_mysqlnd_res_meta__read_metadata)(MYSQLND_RES_ME
747747
typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res_meta__clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool persistent);
748748
typedef void (*func_mysqlnd_res_meta__free_metadata)(MYSQLND_RES_METADATA * meta);
749749

750-
struct st_mysqlnd_res_meta_methods
750+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_res_meta)
751751
{
752752
func_mysqlnd_res_meta__fetch_field fetch_field;
753753
func_mysqlnd_res_meta__fetch_field_direct fetch_field_direct;
@@ -804,7 +804,7 @@ typedef void (*func_mysqlnd_stmt__free_stmt_content)(MYSQLND_STMT * const s)
804804
typedef enum_func_status (*func_mysqlnd_stmt__flush)(MYSQLND_STMT * const stmt);
805805
typedef void (*func_mysqlnd_stmt__free_stmt_result)(MYSQLND_STMT * const s);
806806

807-
struct st_mysqlnd_stmt_methods
807+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_stmt)
808808
{
809809
func_mysqlnd_stmt__prepare prepare;
810810
func_mysqlnd_stmt__send_execute send_execute;
@@ -880,7 +880,7 @@ struct st_mysqlnd_net_data
880880

881881
zend_bool persistent;
882882

883-
struct st_mysqlnd_net_methods m;
883+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_net) m;
884884
};
885885

886886

@@ -909,7 +909,7 @@ struct st_mysqlnd_protocol_payload_decoder_factory
909909
{
910910
MYSQLND_CONN_DATA * conn;
911911
zend_bool persistent;
912-
struct st_mysqlnd_protocol_payload_decoder_factory_methods m;
912+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_protocol_payload_decoder_factory) m;
913913
};
914914

915915

@@ -999,10 +999,10 @@ struct st_mysqlnd_connection_data
999999
zend_bool in_async_read_cb;
10001000
zend_bool in_async_err_cb;
10011001

1002-
struct st_mysqlnd_object_factory_methods object_factory;
1002+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_object_factory) object_factory;
10031003
func_mysqlnd__command_factory command_factory;
10041004

1005-
struct st_mysqlnd_conn_data_methods * m;
1005+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_conn_data) * m;
10061006

10071007
/* persistent connection */
10081008
zend_bool persistent;
@@ -1013,7 +1013,7 @@ struct st_mysqlnd_connection
10131013
{
10141014
MYSQLND_CONN_DATA * data;
10151015
zend_bool persistent;
1016-
struct st_mysqlnd_conn_methods * m;
1016+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_conn) * m;
10171017
};
10181018

10191019

@@ -1029,7 +1029,7 @@ struct st_mysqlnd_result_metadata
10291029
MYSQLND_FIELD *fields;
10301030
struct mysqlnd_field_hash_key *zend_hash_keys;
10311031

1032-
struct st_mysqlnd_res_meta_methods * m;
1032+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_res_meta) * m;
10331033

10341034
size_t bit_fields_total_len; /* trailing \0 not counted */
10351035
/* We need this to make fast allocs in rowp_read */
@@ -1059,7 +1059,7 @@ struct st_mysqlnd_result_metadata
10591059
unsigned int field_count; \
10601060
zend_bool ps; \
10611061
zend_bool persistent; \
1062-
struct st_mysqlnd_result_buffered_methods m; \
1062+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_result_buffered) m; \
10631063
enum mysqlnd_buffered_type type; \
10641064
void * unused1; \
10651065
void * unused2; \
@@ -1092,7 +1092,7 @@ struct st_mysqlnd_buffered_result_c
10921092

10931093
struct st_mysqlnd_unbuffered_result
10941094
{
1095-
struct st_mysqlnd_result_unbuffered_methods m;
1095+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_result_unbuffered) m;
10961096
uint64_t row_count;
10971097

10981098
/* For unbuffered (both normal and PS) */
@@ -1133,8 +1133,7 @@ struct st_mysqlnd_res
11331133
MYSQLND_RES_UNBUFFERED *unbuf;
11341134

11351135
zend_bool persistent;
1136-
1137-
struct st_mysqlnd_res_methods m;
1136+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_res) m;
11381137
};
11391138

11401139

@@ -1193,7 +1192,7 @@ struct st_mysqlnd_stmt_data
11931192
struct st_mysqlnd_stmt
11941193
{
11951194
MYSQLND_STMT_DATA * data;
1196-
struct st_mysqlnd_stmt_methods *m;
1195+
MYSQLND_CLASS_METHOD_TABLE_NAME_DECL(mysqlnd_stmt) * m;
11971196
zend_bool persistent;
11981197
};
11991198

0 commit comments

Comments
 (0)