From d046aca0c76da36c8ba14359034a716af667aa51 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 30 Aug 2024 11:04:14 +0200 Subject: [PATCH] cleanup: CREATE_TYPELIB_FOR() helper --- client/mysqladmin.cc | 3 +- client/mysqlbinlog.cc | 4 +- client/mysqlcheck.c | 3 +- client/mysqldump.cc | 9 +- client/mysqltest.cc | 3 +- extra/mariabackup/xbcloud.cc | 3 +- extra/mariabackup/xtrabackup.cc | 6 +- include/typelib.h | 2 + mysys/my_static.c | 3 +- mysys/typelib.c | 3 +- plugin/auth_gssapi/server_plugin.cc | 7 +- .../aws_key_management_plugin.cc | 12 +- .../file_key_management_plugin.cc | 7 +- plugin/query_response_time/plugin.cc | 3 +- plugin/server_audit/server_audit.c | 23 +- sql-common/client.c | 3 +- sql/backup.cc | 3 +- sql/handler.cc | 3 +- sql/item_strfunc.cc | 8 +- sql/log_event.cc | 8 +- sql/repl_failsafe.cc | 3 +- sql/sql_db.cc | 3 +- sql/sql_locale.cc | 472 +++++++++--------- sql/sql_plugin.cc | 3 +- sql/sql_show.cc | 5 +- sql/sys_vars.cc | 8 +- sql/sys_vars.inl | 2 +- storage/connect/ha_connect.cc | 24 +- storage/example/ha_example.cc | 6 +- storage/innobase/handler/ha_innodb.cc | 67 +-- storage/maria/aria_chk.c | 4 +- storage/maria/aria_s3_copy.cc | 2 +- storage/maria/ha_maria.cc | 30 +- storage/maria/s3_func.c | 3 +- storage/mroonga/ha_mroonga.cpp | 23 +- storage/myisam/ha_myisam.cc | 8 +- storage/myisam/myisamchk.c | 5 +- storage/myisammrg/myrg_static.c | 3 +- storage/rocksdb/ha_rocksdb.cc | 16 +- 39 files changed, 317 insertions(+), 486 deletions(-) diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 17628dc52c2..304e26afa3b 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -111,8 +111,7 @@ static const char *command_names[]= { NullS }; -static TYPELIB command_typelib= -{ array_elements(command_names)-1,"commands", command_names, NULL}; +static TYPELIB command_typelib= CREATE_TYPELIB_FOR(command_names); static struct my_option my_long_options[] = { diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 370681f24f9..812cde74759 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -116,9 +116,7 @@ static bool one_database=0, one_table=0, to_last_remote_log= 0, disable_log_bin= static bool opt_hexdump= 0, opt_version= 0; const char *base64_output_mode_names[]= {"NEVER", "AUTO", "UNSPEC", "DECODE-ROWS", NullS}; -TYPELIB base64_output_mode_typelib= - { array_elements(base64_output_mode_names) - 1, "", - base64_output_mode_names, NULL }; +TYPELIB base64_output_mode_typelib=CREATE_TYPELIB_FOR(base64_output_mode_names); static enum_base64_output_mode opt_base64_output_mode= BASE64_OUTPUT_UNSPEC; static char *opt_base64_output_mode_str= NullS; static char* database= 0; diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index ca292dc24b3..7dbb24df1ca 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -66,8 +66,7 @@ const char *operation_name[]= typedef enum { DO_VIEWS_NO, DO_VIEWS_YES, DO_UPGRADE, DO_VIEWS_FROM_MYSQL } enum_do_views; const char *do_views_opts[]= {"NO", "YES", "UPGRADE", "UPGRADE_FROM_MYSQL", NullS}; -TYPELIB do_views_typelib= { array_elements(do_views_opts) - 1, "", - do_views_opts, NULL }; +TYPELIB do_views_typelib= CREATE_TYPELIB_FOR(do_views_opts); static ulong opt_do_views= DO_VIEWS_NO; static struct my_option my_long_options[] = diff --git a/client/mysqldump.cc b/client/mysqldump.cc index ddae1440896..d88607b3cc1 100644 --- a/client/mysqldump.cc +++ b/client/mysqldump.cc @@ -140,11 +140,7 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0, opt_no_data_m #define OPT_SYSTEM_TIMEZONES 64 static const char *opt_system_type_values[]= {"all", "users", "plugins", "udfs", "servers", "stats", "timezones"}; -static TYPELIB opt_system_types= -{ - array_elements(opt_system_type_values), "system dump options", - opt_system_type_values, NULL -}; +static TYPELIB opt_system_types=CREATE_TYPELIB_FOR(opt_system_type_values); static ulonglong opt_system= 0ULL; static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0, select_field_names_inited= 0; @@ -250,8 +246,7 @@ const char *compatible_mode_names[]= (1U<<6) | /* MAXDB */\ (1U<<10) /* ANSI */\ ) -TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1, - "", compatible_mode_names, NULL}; +TYPELIB compatible_mode_typelib= CREATE_TYPELIB_FOR(compatible_mode_names); #define MED_ENGINES "MRG_MyISAM, MRG_ISAM, CONNECT, OQGRAPH, SPIDER, VP, FEDERATED" diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 688fa0285b2..3de4468ecf3 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -594,8 +594,7 @@ struct st_command enum enum_commands type; }; -TYPELIB command_typelib= {array_elements(command_names),"", - command_names, 0}; +TYPELIB command_typelib= CREATE_TYPELIB_FOR(command_names); DYNAMIC_STRING ds_res; /* Points to ds_warning in run_query, so it can be freed */ diff --git a/extra/mariabackup/xbcloud.cc b/extra/mariabackup/xbcloud.cc index 588a15eb791..fa5dc79edbc 100644 --- a/extra/mariabackup/xbcloud.cc +++ b/extra/mariabackup/xbcloud.cc @@ -176,8 +176,7 @@ static enum {MODE_GET, MODE_PUT, MODE_DELETE} opt_mode; static char **file_list = NULL; static int file_list_size = 0; -TYPELIB storage_typelib = -{array_elements(storage_names)-1, "", storage_names, NULL}; +TYPELIB storage_typelib = CREATE_TYPELIB_FOR(storage_names); enum { OPT_STORAGE = 256, diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 6a06111b489..77ad1f97b11 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -385,8 +385,7 @@ static ulong innodb_flush_method; static const char *binlog_info_values[] = {"off", "lockless", "on", "auto", NullS}; -static TYPELIB binlog_info_typelib = {array_elements(binlog_info_values)-1, "", - binlog_info_values, NULL}; +static TYPELIB binlog_info_typelib = CREATE_TYPELIB_FOR(binlog_info_values); ulong opt_binlog_info; char *opt_incremental_history_name; @@ -402,8 +401,7 @@ char *opt_log_bin; const char *query_type_names[] = { "ALL", "UPDATE", "SELECT", NullS}; -TYPELIB query_type_typelib= {array_elements(query_type_names) - 1, "", - query_type_names, NULL}; +TYPELIB query_type_typelib= CREATE_TYPELIB_FOR(query_type_names); ulong opt_lock_wait_query_type; ulong opt_kill_long_query_type; diff --git a/include/typelib.h b/include/typelib.h index dc315dd3bb8..9a8ee802cae 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -27,6 +27,8 @@ typedef struct st_typelib { /* Different types saved here */ unsigned int *type_lengths; } TYPELIB; +#define CREATE_TYPELIB_FOR(X) { (unsigned int)(sizeof(X)/sizeof(X[0])) - 1, "", X, NULL } + extern my_ulonglong find_typeset(const char *x, TYPELIB *typelib, int *error_position); extern int find_type_with_warning(const char *x, TYPELIB *typelib, diff --git a/mysys/my_static.c b/mysys/my_static.c index 35e67693e15..84892895cb9 100644 --- a/mysys/my_static.c +++ b/mysys/my_static.c @@ -130,5 +130,4 @@ my_bool my_disable_copystat_in_redel=0; const char *sql_protocol_names_lib[] = { "TCP", "SOCKET", "PIPE", NullS }; -TYPELIB sql_protocol_typelib ={ array_elements(sql_protocol_names_lib) - 1, "", - sql_protocol_names_lib, NULL }; +TYPELIB sql_protocol_typelib= CREATE_TYPELIB_FOR(sql_protocol_names_lib); diff --git a/mysys/typelib.c b/mysys/typelib.c index 03f3609b5e8..10296c35bfb 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -265,8 +265,7 @@ TYPELIB *copy_typelib(MEM_ROOT *root, const TYPELIB *from) static const char *on_off_default_names[]= { "off","on","default", 0}; -static TYPELIB on_off_default_typelib= {array_elements(on_off_default_names)-1, - "", on_off_default_names, 0}; +static TYPELIB on_off_default_typelib= CREATE_TYPELIB_FOR(on_off_default_names); /** Parse a TYPELIB name from the buffer diff --git a/plugin/auth_gssapi/server_plugin.cc b/plugin/auth_gssapi/server_plugin.cc index 373c12d0c13..d8b10dd42fb 100644 --- a/plugin/auth_gssapi/server_plugin.cc +++ b/plugin/auth_gssapi/server_plugin.cc @@ -109,12 +109,7 @@ static const char* mech_names[] = { "", NULL }; -static TYPELIB mech_name_typelib = { - 3, - "mech_name_typelib", - mech_names, - NULL -}; +static TYPELIB mech_name_typelib = CREATE_TYPELIB_FOR(mech_names); static MYSQL_SYSVAR_ENUM(mech_name, srv_mech, PLUGIN_VAR_RQCMDARG|PLUGIN_VAR_READONLY, "GSSAPI mechanism", diff --git a/plugin/aws_key_management/aws_key_management_plugin.cc b/plugin/aws_key_management/aws_key_management_plugin.cc index f4f6dee9a63..3a6a803862f 100644 --- a/plugin/aws_key_management/aws_key_management_plugin.cc +++ b/plugin/aws_key_management/aws_key_management_plugin.cc @@ -673,11 +673,7 @@ struct st_mariadb_encryption aws_key_management_plugin= { }; -static TYPELIB key_spec_typelib = -{ - array_elements(key_spec_names) - 1, "", - key_spec_names, NULL -}; +static TYPELIB key_spec_typelib = CREATE_TYPELIB_FOR(key_spec_names); const char *log_level_names[] = { @@ -691,11 +687,7 @@ const char *log_level_names[] = 0 }; -static TYPELIB log_level_typelib = -{ - array_elements(log_level_names) - 1, "", - log_level_names, NULL -}; +static TYPELIB log_level_typelib = CREATE_TYPELIB_FOR(log_level_names); static MYSQL_SYSVAR_STR(master_key_id, master_key_id, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, diff --git a/plugin/file_key_management/file_key_management_plugin.cc b/plugin/file_key_management/file_key_management_plugin.cc index 498a22d6e92..8702785a1fd 100644 --- a/plugin/file_key_management/file_key_management_plugin.cc +++ b/plugin/file_key_management/file_key_management_plugin.cc @@ -32,12 +32,7 @@ static const char *encryption_algorithm_names[]= 0 }; -static TYPELIB encryption_algorithm_typelib= -{ - array_elements(encryption_algorithm_names)-1,"", - encryption_algorithm_names, NULL -}; - +static TYPELIB encryption_algorithm_typelib=CREATE_TYPELIB_FOR(encryption_algorithm_names); static MYSQL_SYSVAR_STR(filename, filename, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, diff --git a/plugin/query_response_time/plugin.cc b/plugin/query_response_time/plugin.cc index 7ad50ac4bac..0dc6fcdcbf0 100644 --- a/plugin/query_response_time/plugin.cc +++ b/plugin/query_response_time/plugin.cc @@ -45,8 +45,7 @@ enum session_stat }; static const char *session_stat_names[]= {"GLOBAL", "ON", "OFF", NullS}; -static TYPELIB session_stat_typelib= { array_elements(session_stat_names) - 1, - "", session_stat_names, NULL}; +static TYPELIB session_stat_typelib= CREATE_TYPELIB_FOR(session_stat_names); static MYSQL_SYSVAR_ULONG(range_base, opt_query_response_time_range_base, diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index d830169809f..3e1d87d9a20 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -393,10 +393,7 @@ static const char *event_names[]= "CONNECT", "QUERY", "TABLE", "QUERY_DDL", "QUERY_DML", "QUERY_DCL", "QUERY_DML_NO_SELECT", NULL }; -static TYPELIB events_typelib= -{ - array_elements(event_names) - 1, "", event_names, NULL -}; +static TYPELIB events_typelib= CREATE_TYPELIB_FOR(event_names); static MYSQL_SYSVAR_SET(events, events, PLUGIN_VAR_RQCMDARG, "Specifies the set of events to monitor. Can be CONNECT, QUERY, TABLE," " QUERY_DDL, QUERY_DML, QUERY_DML_NO_SELECT, QUERY_DCL", @@ -415,11 +412,7 @@ static const char *output_type_names[]= { "syslog", #endif "file", 0 }; -static TYPELIB output_typelib= -{ - array_elements(output_type_names) - 1, "output_typelib", - output_type_names, NULL -}; +static TYPELIB output_typelib=CREATE_TYPELIB_FOR(output_type_names); static MYSQL_SYSVAR_ENUM(output_type, output_type, PLUGIN_VAR_RQCMDARG, out_type_desc, 0, update_output_type, OUTPUT_FILE, @@ -487,11 +480,7 @@ static unsigned int syslog_facility_codes[]= LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7, }; #endif -static TYPELIB syslog_facility_typelib= -{ - array_elements(syslog_facility_names) - 1, "syslog_facility_typelib", - syslog_facility_names, NULL -}; +static TYPELIB syslog_facility_typelib=CREATE_TYPELIB_FOR(syslog_facility_names); static MYSQL_SYSVAR_ENUM(syslog_facility, syslog_facility, PLUGIN_VAR_RQCMDARG, "The 'facility' parameter of the SYSLOG record." " The default is LOG_USER", 0, update_syslog_facility, 0/*LOG_USER*/, @@ -512,11 +501,7 @@ static unsigned int syslog_priority_codes[]= }; #endif -static TYPELIB syslog_priority_typelib= -{ - array_elements(syslog_priority_names) - 1, "syslog_priority_typelib", - syslog_priority_names, NULL -}; +static TYPELIB syslog_priority_typelib=CREATE_TYPELIB_FOR(syslog_priority_names); static MYSQL_SYSVAR_ENUM(syslog_priority, syslog_priority, PLUGIN_VAR_RQCMDARG, "The 'priority' parameter of the SYSLOG record." " The default is LOG_INFO", 0, update_syslog_priority, 6/*LOG_INFO*/, diff --git a/sql-common/client.c b/sql-common/client.c index 6d030ce0a17..05dc32cbc77 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -811,8 +811,7 @@ static char *opt_strdup(const char *from, myf my_flags) return my_strdup(key_memory_mysql_options, from, my_flags); } -static TYPELIB option_types={array_elements(default_options)-1, - "options",default_options, NULL}; +static TYPELIB option_types=CREATE_TYPELIB_FOR(default_options); static int add_init_command(struct st_mysql_options *options, const char *cmd) { diff --git a/sql/backup.cc b/sql/backup.cc index f634a11f867..688a3ab5b7f 100644 --- a/sql/backup.cc +++ b/sql/backup.cc @@ -45,8 +45,7 @@ static const char *stage_names[]= {"START", "FLUSH", "BLOCK_DDL", "BLOCK_COMMIT", "END", 0}; -TYPELIB backup_stage_names= -{ array_elements(stage_names)-1, "", stage_names, 0 }; +TYPELIB backup_stage_names= CREATE_TYPELIB_FOR(stage_names); static MDL_ticket *backup_flush_ticket; static File volatile backup_log= -1; diff --git a/sql/handler.cc b/sql/handler.cc index 2c62a21422d..5d7a9c13808 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -152,8 +152,7 @@ const LEX_CSTRING ha_row_type[]= const char *tx_isolation_names[]= { "READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ", "SERIALIZABLE", NullS}; -TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"", - tx_isolation_names, NULL}; +TYPELIB tx_isolation_typelib= CREATE_TYPELIB_FOR(tx_isolation_names); static TYPELIB known_extensions= {0,"known_exts", NULL, NULL}; uint known_extensions_id= 0; diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 7c15756f57d..8b9c5301a9d 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -326,7 +326,8 @@ const char *block_encryption_mode_values[]= { "aes-128-cbc", "aes-192-cbc", "aes-256-cbc", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", NullS }; -TYPELIB block_encryption_mode_typelib= {9, 0, block_encryption_mode_values, 0}; +TYPELIB block_encryption_mode_typelib= + CREATE_TYPELIB_FOR(block_encryption_mode_values); static inline uint block_encryption_mode_to_key_length(ulong bem) { return (bem % 3 + 2) * 64; } static inline my_aes_mode block_encryption_mode_to_aes_mode(ulong bem) @@ -671,10 +672,7 @@ err: const char *histogram_types[] = {"SINGLE_PREC_HB", "DOUBLE_PREC_HB", "JSON_HB", 0}; -static TYPELIB histogram_types_typelib= - { array_elements(histogram_types), - "histogram_types", - histogram_types, NULL}; +static TYPELIB histogram_types_typelib= CREATE_TYPELIB_FOR(histogram_types); const char *representation_by_type[]= {"%.3f", "%.5f"}; String *Item_func_decode_histogram::val_str(String *str) diff --git a/sql/log_event.cc b/sql/log_event.cc index 250e8142838..4c79ff440af 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -80,13 +80,7 @@ unsigned int binlog_checksum_type_length[]= { 0 }; -TYPELIB binlog_checksum_typelib= -{ - array_elements(binlog_checksum_type_names) - 1, "", - binlog_checksum_type_names, - binlog_checksum_type_length -}; - +TYPELIB binlog_checksum_typelib= CREATE_TYPELIB_FOR(binlog_checksum_type_names); #define FLAGSTR(V,F) ((V)&(F)?#F" ":"") diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index baff06d60ee..164ae02df4d 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -55,8 +55,7 @@ ulong rpl_status=RPL_NULL; mysql_mutex_t LOCK_rpl_status; const char *rpl_role_type[] = {"MASTER","SLAVE",NullS}; -TYPELIB rpl_role_typelib = {array_elements(rpl_role_type)-1,"", - rpl_role_type, NULL}; +TYPELIB rpl_role_typelib = CREATE_TYPELIB_FOR(rpl_role_type); const char* rpl_status_type[]= { diff --git a/sql/sql_db.cc b/sql/sql_db.cc index f9750ca6d8c..651ebe0074b 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -52,8 +52,7 @@ #define MAX_DROP_TABLE_Q_LEN 1024 const char *del_exts[]= {".BAK", ".opt", NullS}; -static TYPELIB deletable_extensions= -{array_elements(del_exts)-1,"del_exts", del_exts, NULL}; +static TYPELIB deletable_extensions= CREATE_TYPELIB_FOR(del_exts); static bool find_db_tables_and_rm_known_files(THD *, MY_DIR *, const Lex_ident_db_normalized &db, diff --git a/sql/sql_locale.cc b/sql/sql_locale.cc index 3b4287c618e..da9c81a3153 100644 --- a/sql/sql_locale.cc +++ b/sql/sql_locale.cc @@ -78,13 +78,13 @@ static const char *my_locale_day_names_ar_AE[8] = static const char *my_locale_ab_day_names_ar_AE[8] = {"ن","ث","ر","خ","ج","س","ح", NullS }; static TYPELIB my_locale_typelib_month_names_ar_AE = - { array_elements(my_locale_month_names_ar_AE)-1, "", my_locale_month_names_ar_AE, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ar_AE); static TYPELIB my_locale_typelib_ab_month_names_ar_AE = - { array_elements(my_locale_ab_month_names_ar_AE)-1, "", my_locale_ab_month_names_ar_AE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ar_AE); static TYPELIB my_locale_typelib_day_names_ar_AE = - { array_elements(my_locale_day_names_ar_AE)-1, "", my_locale_day_names_ar_AE, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ar_AE); static TYPELIB my_locale_typelib_ab_day_names_ar_AE = - { array_elements(my_locale_ab_day_names_ar_AE)-1, "", my_locale_ab_day_names_ar_AE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ar_AE); MY_LOCALE my_locale_ar_AE ( 6, @@ -114,13 +114,13 @@ static const char *my_locale_day_names_ar_BH[8] = static const char *my_locale_ab_day_names_ar_BH[8] = {"ن","ث","ر","خ","ج","س","ح", NullS }; static TYPELIB my_locale_typelib_month_names_ar_BH = - { array_elements(my_locale_month_names_ar_BH)-1, "", my_locale_month_names_ar_BH, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ar_BH); static TYPELIB my_locale_typelib_ab_month_names_ar_BH = - { array_elements(my_locale_ab_month_names_ar_BH)-1, "", my_locale_ab_month_names_ar_BH, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ar_BH); static TYPELIB my_locale_typelib_day_names_ar_BH = - { array_elements(my_locale_day_names_ar_BH)-1, "", my_locale_day_names_ar_BH, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ar_BH); static TYPELIB my_locale_typelib_ab_day_names_ar_BH = - { array_elements(my_locale_ab_day_names_ar_BH)-1, "", my_locale_ab_day_names_ar_BH, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ar_BH); MY_LOCALE my_locale_ar_BH ( 7, @@ -150,13 +150,13 @@ static const char *my_locale_day_names_ar_JO[8] = static const char *my_locale_ab_day_names_ar_JO[8] = {"الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد", NullS }; static TYPELIB my_locale_typelib_month_names_ar_JO = - { array_elements(my_locale_month_names_ar_JO)-1, "", my_locale_month_names_ar_JO, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ar_JO); static TYPELIB my_locale_typelib_ab_month_names_ar_JO = - { array_elements(my_locale_ab_month_names_ar_JO)-1, "", my_locale_ab_month_names_ar_JO, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ar_JO); static TYPELIB my_locale_typelib_day_names_ar_JO = - { array_elements(my_locale_day_names_ar_JO)-1, "", my_locale_day_names_ar_JO, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ar_JO); static TYPELIB my_locale_typelib_ab_day_names_ar_JO = - { array_elements(my_locale_ab_day_names_ar_JO)-1, "", my_locale_ab_day_names_ar_JO, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ar_JO); MY_LOCALE my_locale_ar_JO ( 8, @@ -186,13 +186,13 @@ static const char *my_locale_day_names_ar_SA[8] = static const char *my_locale_ab_day_names_ar_SA[8] = {"Mon","Tue","Wed","Thu","Fri","Sat","Sun", NullS }; static TYPELIB my_locale_typelib_month_names_ar_SA = - { array_elements(my_locale_month_names_ar_SA)-1, "", my_locale_month_names_ar_SA, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ar_SA); static TYPELIB my_locale_typelib_ab_month_names_ar_SA = - { array_elements(my_locale_ab_month_names_ar_SA)-1, "", my_locale_ab_month_names_ar_SA, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ar_SA); static TYPELIB my_locale_typelib_day_names_ar_SA = - { array_elements(my_locale_day_names_ar_SA)-1, "", my_locale_day_names_ar_SA, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ar_SA); static TYPELIB my_locale_typelib_ab_day_names_ar_SA = - { array_elements(my_locale_ab_day_names_ar_SA)-1, "", my_locale_ab_day_names_ar_SA, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ar_SA); MY_LOCALE my_locale_ar_SA ( 9, @@ -222,13 +222,13 @@ static const char *my_locale_day_names_ar_SY[8] = static const char *my_locale_ab_day_names_ar_SY[8] = {"الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد", NullS }; static TYPELIB my_locale_typelib_month_names_ar_SY = - { array_elements(my_locale_month_names_ar_SY)-1, "", my_locale_month_names_ar_SY, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ar_SY); static TYPELIB my_locale_typelib_ab_month_names_ar_SY = - { array_elements(my_locale_ab_month_names_ar_SY)-1, "", my_locale_ab_month_names_ar_SY, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ar_SY); static TYPELIB my_locale_typelib_day_names_ar_SY = - { array_elements(my_locale_day_names_ar_SY)-1, "", my_locale_day_names_ar_SY, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ar_SY); static TYPELIB my_locale_typelib_ab_day_names_ar_SY = - { array_elements(my_locale_ab_day_names_ar_SY)-1, "", my_locale_ab_day_names_ar_SY, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ar_SY); MY_LOCALE my_locale_ar_SY ( 10, @@ -258,13 +258,13 @@ static const char *my_locale_day_names_be_BY[8] = static const char *my_locale_ab_day_names_be_BY[8] = {"Пан","Аўт","Срд","Чцв","Пят","Суб","Няд", NullS }; static TYPELIB my_locale_typelib_month_names_be_BY = - { array_elements(my_locale_month_names_be_BY)-1, "", my_locale_month_names_be_BY, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_be_BY); static TYPELIB my_locale_typelib_ab_month_names_be_BY = - { array_elements(my_locale_ab_month_names_be_BY)-1, "", my_locale_ab_month_names_be_BY, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_be_BY); static TYPELIB my_locale_typelib_day_names_be_BY = - { array_elements(my_locale_day_names_be_BY)-1, "", my_locale_day_names_be_BY, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_be_BY); static TYPELIB my_locale_typelib_ab_day_names_be_BY = - { array_elements(my_locale_ab_day_names_be_BY)-1, "", my_locale_ab_day_names_be_BY, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_be_BY); MY_LOCALE my_locale_be_BY ( 11, @@ -294,13 +294,13 @@ static const char *my_locale_day_names_bg_BG[8] = static const char *my_locale_ab_day_names_bg_BG[8] = {"пн","вт","ср","чт","пт","сб","нд", NullS }; static TYPELIB my_locale_typelib_month_names_bg_BG = - { array_elements(my_locale_month_names_bg_BG)-1, "", my_locale_month_names_bg_BG, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_bg_BG); static TYPELIB my_locale_typelib_ab_month_names_bg_BG = - { array_elements(my_locale_ab_month_names_bg_BG)-1, "", my_locale_ab_month_names_bg_BG, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_bg_BG); static TYPELIB my_locale_typelib_day_names_bg_BG = - { array_elements(my_locale_day_names_bg_BG)-1, "", my_locale_day_names_bg_BG, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_bg_BG); static TYPELIB my_locale_typelib_ab_day_names_bg_BG = - { array_elements(my_locale_ab_day_names_bg_BG)-1, "", my_locale_ab_day_names_bg_BG, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_bg_BG); MY_LOCALE my_locale_bg_BG ( 12, @@ -330,13 +330,13 @@ static const char *my_locale_day_names_ca_ES[8] = static const char *my_locale_ab_day_names_ca_ES[8] = {"dl","dt","dc","dj","dv","ds","dg", NullS }; static TYPELIB my_locale_typelib_month_names_ca_ES = - { array_elements(my_locale_month_names_ca_ES)-1, "", my_locale_month_names_ca_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ca_ES); static TYPELIB my_locale_typelib_ab_month_names_ca_ES = - { array_elements(my_locale_ab_month_names_ca_ES)-1, "", my_locale_ab_month_names_ca_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ca_ES); static TYPELIB my_locale_typelib_day_names_ca_ES = - { array_elements(my_locale_day_names_ca_ES)-1, "", my_locale_day_names_ca_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ca_ES); static TYPELIB my_locale_typelib_ab_day_names_ca_ES = - { array_elements(my_locale_ab_day_names_ca_ES)-1, "", my_locale_ab_day_names_ca_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ca_ES); MY_LOCALE my_locale_ca_ES ( 13, @@ -366,13 +366,13 @@ static const char *my_locale_day_names_cs_CZ[8] = static const char *my_locale_ab_day_names_cs_CZ[8] = {"Po","Út","St","Čt","Pá","So","Ne", NullS }; static TYPELIB my_locale_typelib_month_names_cs_CZ = - { array_elements(my_locale_month_names_cs_CZ)-1, "", my_locale_month_names_cs_CZ, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_cs_CZ); static TYPELIB my_locale_typelib_ab_month_names_cs_CZ = - { array_elements(my_locale_ab_month_names_cs_CZ)-1, "", my_locale_ab_month_names_cs_CZ, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_cs_CZ); static TYPELIB my_locale_typelib_day_names_cs_CZ = - { array_elements(my_locale_day_names_cs_CZ)-1, "", my_locale_day_names_cs_CZ, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_cs_CZ); static TYPELIB my_locale_typelib_ab_day_names_cs_CZ = - { array_elements(my_locale_ab_day_names_cs_CZ)-1, "", my_locale_ab_day_names_cs_CZ, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_cs_CZ); MY_LOCALE my_locale_cs_CZ ( 14, @@ -402,13 +402,13 @@ static const char *my_locale_day_names_da_DK[8] = static const char *my_locale_ab_day_names_da_DK[8] = {"man","tir","ons","tor","fre","lør","søn", NullS }; static TYPELIB my_locale_typelib_month_names_da_DK = - { array_elements(my_locale_month_names_da_DK)-1, "", my_locale_month_names_da_DK, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_da_DK); static TYPELIB my_locale_typelib_ab_month_names_da_DK = - { array_elements(my_locale_ab_month_names_da_DK)-1, "", my_locale_ab_month_names_da_DK, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_da_DK); static TYPELIB my_locale_typelib_day_names_da_DK = - { array_elements(my_locale_day_names_da_DK)-1, "", my_locale_day_names_da_DK, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_da_DK); static TYPELIB my_locale_typelib_ab_day_names_da_DK = - { array_elements(my_locale_ab_day_names_da_DK)-1, "", my_locale_ab_day_names_da_DK, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_da_DK); MY_LOCALE my_locale_da_DK ( 15, @@ -438,13 +438,13 @@ static const char *my_locale_day_names_de_AT[8] = static const char *my_locale_ab_day_names_de_AT[8] = {"Mon","Die","Mit","Don","Fre","Sam","Son", NullS }; static TYPELIB my_locale_typelib_month_names_de_AT = - { array_elements(my_locale_month_names_de_AT)-1, "", my_locale_month_names_de_AT, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_de_AT); static TYPELIB my_locale_typelib_ab_month_names_de_AT = - { array_elements(my_locale_ab_month_names_de_AT)-1, "", my_locale_ab_month_names_de_AT, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_de_AT); static TYPELIB my_locale_typelib_day_names_de_AT = - { array_elements(my_locale_day_names_de_AT)-1, "", my_locale_day_names_de_AT, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_de_AT); static TYPELIB my_locale_typelib_ab_day_names_de_AT = - { array_elements(my_locale_ab_day_names_de_AT)-1, "", my_locale_ab_day_names_de_AT, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_de_AT); MY_LOCALE my_locale_de_AT ( 16, @@ -474,13 +474,13 @@ static const char *my_locale_day_names_de_DE[8] = static const char *my_locale_ab_day_names_de_DE[8] = {"Mo","Di","Mi","Do","Fr","Sa","So", NullS }; static TYPELIB my_locale_typelib_month_names_de_DE = - { array_elements(my_locale_month_names_de_DE)-1, "", my_locale_month_names_de_DE, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_de_DE); static TYPELIB my_locale_typelib_ab_month_names_de_DE = - { array_elements(my_locale_ab_month_names_de_DE)-1, "", my_locale_ab_month_names_de_DE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_de_DE); static TYPELIB my_locale_typelib_day_names_de_DE = - { array_elements(my_locale_day_names_de_DE)-1, "", my_locale_day_names_de_DE, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_de_DE); static TYPELIB my_locale_typelib_ab_day_names_de_DE = - { array_elements(my_locale_ab_day_names_de_DE)-1, "", my_locale_ab_day_names_de_DE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_de_DE); MY_LOCALE my_locale_de_DE ( 4, @@ -510,13 +510,13 @@ static const char *my_locale_day_names_en_US[8] = static const char *my_locale_ab_day_names_en_US[8] = {"Mon","Tue","Wed","Thu","Fri","Sat","Sun", NullS }; static TYPELIB my_locale_typelib_month_names_en_US = - { array_elements(my_locale_month_names_en_US)-1, "", my_locale_month_names_en_US, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_en_US); static TYPELIB my_locale_typelib_ab_month_names_en_US = - { array_elements(my_locale_ab_month_names_en_US)-1, "", my_locale_ab_month_names_en_US, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_en_US); static TYPELIB my_locale_typelib_day_names_en_US = - { array_elements(my_locale_day_names_en_US)-1, "", my_locale_day_names_en_US, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_en_US); static TYPELIB my_locale_typelib_ab_day_names_en_US = - { array_elements(my_locale_ab_day_names_en_US)-1, "", my_locale_ab_day_names_en_US, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_en_US); MY_LOCALE my_locale_en_US ( 0, @@ -546,13 +546,13 @@ static const char *my_locale_day_names_es_ES[8] = static const char *my_locale_ab_day_names_es_ES[8] = {"lun","mar","mié","jue","vie","sáb","dom", NullS }; static TYPELIB my_locale_typelib_month_names_es_ES = - { array_elements(my_locale_month_names_es_ES)-1, "", my_locale_month_names_es_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_es_ES); static TYPELIB my_locale_typelib_ab_month_names_es_ES = - { array_elements(my_locale_ab_month_names_es_ES)-1, "", my_locale_ab_month_names_es_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_es_ES); static TYPELIB my_locale_typelib_day_names_es_ES = - { array_elements(my_locale_day_names_es_ES)-1, "", my_locale_day_names_es_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_es_ES); static TYPELIB my_locale_typelib_ab_day_names_es_ES = - { array_elements(my_locale_ab_day_names_es_ES)-1, "", my_locale_ab_day_names_es_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_es_ES); MY_LOCALE my_locale_es_ES ( 17, @@ -582,13 +582,13 @@ static const char *my_locale_day_names_et_EE[8] = static const char *my_locale_ab_day_names_et_EE[8] = {"E","T","K","N","R","L","P", NullS }; static TYPELIB my_locale_typelib_month_names_et_EE = - { array_elements(my_locale_month_names_et_EE)-1, "", my_locale_month_names_et_EE, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_et_EE); static TYPELIB my_locale_typelib_ab_month_names_et_EE = - { array_elements(my_locale_ab_month_names_et_EE)-1, "", my_locale_ab_month_names_et_EE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_et_EE); static TYPELIB my_locale_typelib_day_names_et_EE = - { array_elements(my_locale_day_names_et_EE)-1, "", my_locale_day_names_et_EE, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_et_EE); static TYPELIB my_locale_typelib_ab_day_names_et_EE = - { array_elements(my_locale_ab_day_names_et_EE)-1, "", my_locale_ab_day_names_et_EE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_et_EE); MY_LOCALE my_locale_et_EE ( 18, @@ -618,13 +618,13 @@ static const char *my_locale_day_names_eu_ES[8] = static const char *my_locale_ab_day_names_eu_ES[8] = {"al.","ar.","az.","og.","or.","lr.","ig.", NullS }; static TYPELIB my_locale_typelib_month_names_eu_ES = - { array_elements(my_locale_month_names_eu_ES)-1, "", my_locale_month_names_eu_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_eu_ES); static TYPELIB my_locale_typelib_ab_month_names_eu_ES = - { array_elements(my_locale_ab_month_names_eu_ES)-1, "", my_locale_ab_month_names_eu_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_eu_ES); static TYPELIB my_locale_typelib_day_names_eu_ES = - { array_elements(my_locale_day_names_eu_ES)-1, "", my_locale_day_names_eu_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_eu_ES); static TYPELIB my_locale_typelib_ab_day_names_eu_ES = - { array_elements(my_locale_ab_day_names_eu_ES)-1, "", my_locale_ab_day_names_eu_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_eu_ES); MY_LOCALE my_locale_eu_ES ( 19, @@ -654,13 +654,13 @@ static const char *my_locale_day_names_fi_FI[8] = static const char *my_locale_ab_day_names_fi_FI[8] = {"ma","ti","ke","to","pe","la","su", NullS }; static TYPELIB my_locale_typelib_month_names_fi_FI = - { array_elements(my_locale_month_names_fi_FI)-1, "", my_locale_month_names_fi_FI, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_fi_FI); static TYPELIB my_locale_typelib_ab_month_names_fi_FI = - { array_elements(my_locale_ab_month_names_fi_FI)-1, "", my_locale_ab_month_names_fi_FI, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_fi_FI); static TYPELIB my_locale_typelib_day_names_fi_FI = - { array_elements(my_locale_day_names_fi_FI)-1, "", my_locale_day_names_fi_FI, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_fi_FI); static TYPELIB my_locale_typelib_ab_day_names_fi_FI = - { array_elements(my_locale_ab_day_names_fi_FI)-1, "", my_locale_ab_day_names_fi_FI, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_fi_FI); MY_LOCALE my_locale_fi_FI ( 20, @@ -690,13 +690,13 @@ static const char *my_locale_day_names_fo_FO[8] = static const char *my_locale_ab_day_names_fo_FO[8] = {"mán","týs","mik","hós","frí","ley","sun", NullS }; static TYPELIB my_locale_typelib_month_names_fo_FO = - { array_elements(my_locale_month_names_fo_FO)-1, "", my_locale_month_names_fo_FO, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_fo_FO); static TYPELIB my_locale_typelib_ab_month_names_fo_FO = - { array_elements(my_locale_ab_month_names_fo_FO)-1, "", my_locale_ab_month_names_fo_FO, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_fo_FO); static TYPELIB my_locale_typelib_day_names_fo_FO = - { array_elements(my_locale_day_names_fo_FO)-1, "", my_locale_day_names_fo_FO, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_fo_FO); static TYPELIB my_locale_typelib_ab_day_names_fo_FO = - { array_elements(my_locale_ab_day_names_fo_FO)-1, "", my_locale_ab_day_names_fo_FO, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_fo_FO); MY_LOCALE my_locale_fo_FO ( 21, @@ -726,13 +726,13 @@ static const char *my_locale_day_names_fr_FR[8] = static const char *my_locale_ab_day_names_fr_FR[8] = {"lun","mar","mer","jeu","ven","sam","dim", NullS }; static TYPELIB my_locale_typelib_month_names_fr_FR = - { array_elements(my_locale_month_names_fr_FR)-1, "", my_locale_month_names_fr_FR, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_fr_FR); static TYPELIB my_locale_typelib_ab_month_names_fr_FR = - { array_elements(my_locale_ab_month_names_fr_FR)-1, "", my_locale_ab_month_names_fr_FR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_fr_FR); static TYPELIB my_locale_typelib_day_names_fr_FR = - { array_elements(my_locale_day_names_fr_FR)-1, "", my_locale_day_names_fr_FR, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_fr_FR); static TYPELIB my_locale_typelib_ab_day_names_fr_FR = - { array_elements(my_locale_ab_day_names_fr_FR)-1, "", my_locale_ab_day_names_fr_FR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_fr_FR); MY_LOCALE my_locale_fr_FR ( 5, @@ -762,13 +762,13 @@ static const char *my_locale_day_names_gl_ES[8] = static const char *my_locale_ab_day_names_gl_ES[8] = {"Lun","Mar","Mér","Xov","Ven","Sáb","Dom", NullS }; static TYPELIB my_locale_typelib_month_names_gl_ES = - { array_elements(my_locale_month_names_gl_ES)-1, "", my_locale_month_names_gl_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_gl_ES); static TYPELIB my_locale_typelib_ab_month_names_gl_ES = - { array_elements(my_locale_ab_month_names_gl_ES)-1, "", my_locale_ab_month_names_gl_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_gl_ES); static TYPELIB my_locale_typelib_day_names_gl_ES = - { array_elements(my_locale_day_names_gl_ES)-1, "", my_locale_day_names_gl_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_gl_ES); static TYPELIB my_locale_typelib_ab_day_names_gl_ES = - { array_elements(my_locale_ab_day_names_gl_ES)-1, "", my_locale_ab_day_names_gl_ES, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_gl_ES); MY_LOCALE my_locale_gl_ES ( 22, @@ -798,13 +798,13 @@ static const char *my_locale_day_names_gu_IN[8] = static const char *my_locale_ab_day_names_gu_IN[8] = {"સોમ","મન્ગળ","બુધ","ગુરુ","શુક્ર","શનિ","રવિ", NullS }; static TYPELIB my_locale_typelib_month_names_gu_IN = - { array_elements(my_locale_month_names_gu_IN)-1, "", my_locale_month_names_gu_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_gu_IN); static TYPELIB my_locale_typelib_ab_month_names_gu_IN = - { array_elements(my_locale_ab_month_names_gu_IN)-1, "", my_locale_ab_month_names_gu_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_gu_IN); static TYPELIB my_locale_typelib_day_names_gu_IN = - { array_elements(my_locale_day_names_gu_IN)-1, "", my_locale_day_names_gu_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_gu_IN); static TYPELIB my_locale_typelib_ab_day_names_gu_IN = - { array_elements(my_locale_ab_day_names_gu_IN)-1, "", my_locale_ab_day_names_gu_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_gu_IN); MY_LOCALE my_locale_gu_IN ( 23, @@ -834,13 +834,13 @@ static const char *my_locale_day_names_he_IL[8] = static const char *my_locale_ab_day_names_he_IL[8] = {"ב'","ג'","ד'","ה'","ו'","ש'","א'", NullS }; static TYPELIB my_locale_typelib_month_names_he_IL = - { array_elements(my_locale_month_names_he_IL)-1, "", my_locale_month_names_he_IL, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_he_IL); static TYPELIB my_locale_typelib_ab_month_names_he_IL = - { array_elements(my_locale_ab_month_names_he_IL)-1, "", my_locale_ab_month_names_he_IL, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_he_IL); static TYPELIB my_locale_typelib_day_names_he_IL = - { array_elements(my_locale_day_names_he_IL)-1, "", my_locale_day_names_he_IL, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_he_IL); static TYPELIB my_locale_typelib_ab_day_names_he_IL = - { array_elements(my_locale_ab_day_names_he_IL)-1, "", my_locale_ab_day_names_he_IL, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_he_IL); MY_LOCALE my_locale_he_IL ( 24, @@ -870,13 +870,13 @@ static const char *my_locale_day_names_hi_IN[8] = static const char *my_locale_ab_day_names_hi_IN[8] = {"सोम ","मंगल ","बुध ","गुरु ","शुक्र ","शनि ","रवि ", NullS }; static TYPELIB my_locale_typelib_month_names_hi_IN = - { array_elements(my_locale_month_names_hi_IN)-1, "", my_locale_month_names_hi_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_hi_IN); static TYPELIB my_locale_typelib_ab_month_names_hi_IN = - { array_elements(my_locale_ab_month_names_hi_IN)-1, "", my_locale_ab_month_names_hi_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_hi_IN); static TYPELIB my_locale_typelib_day_names_hi_IN = - { array_elements(my_locale_day_names_hi_IN)-1, "", my_locale_day_names_hi_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_hi_IN); static TYPELIB my_locale_typelib_ab_day_names_hi_IN = - { array_elements(my_locale_ab_day_names_hi_IN)-1, "", my_locale_ab_day_names_hi_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_hi_IN); MY_LOCALE my_locale_hi_IN ( 25, @@ -906,13 +906,13 @@ static const char *my_locale_day_names_hr_HR[8] = static const char *my_locale_ab_day_names_hr_HR[8] = {"Pon","Uto","Sri","Čet","Pet","Sub","Ned", NullS }; static TYPELIB my_locale_typelib_month_names_hr_HR = - { array_elements(my_locale_month_names_hr_HR)-1, "", my_locale_month_names_hr_HR, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_hr_HR); static TYPELIB my_locale_typelib_ab_month_names_hr_HR = - { array_elements(my_locale_ab_month_names_hr_HR)-1, "", my_locale_ab_month_names_hr_HR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_hr_HR); static TYPELIB my_locale_typelib_day_names_hr_HR = - { array_elements(my_locale_day_names_hr_HR)-1, "", my_locale_day_names_hr_HR, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_hr_HR); static TYPELIB my_locale_typelib_ab_day_names_hr_HR = - { array_elements(my_locale_ab_day_names_hr_HR)-1, "", my_locale_ab_day_names_hr_HR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_hr_HR); MY_LOCALE my_locale_hr_HR ( 26, @@ -942,13 +942,13 @@ static const char *my_locale_day_names_hu_HU[8] = static const char *my_locale_ab_day_names_hu_HU[8] = {"h","k","sze","cs","p","szo","v", NullS }; static TYPELIB my_locale_typelib_month_names_hu_HU = - { array_elements(my_locale_month_names_hu_HU)-1, "", my_locale_month_names_hu_HU, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_hu_HU); static TYPELIB my_locale_typelib_ab_month_names_hu_HU = - { array_elements(my_locale_ab_month_names_hu_HU)-1, "", my_locale_ab_month_names_hu_HU, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_hu_HU); static TYPELIB my_locale_typelib_day_names_hu_HU = - { array_elements(my_locale_day_names_hu_HU)-1, "", my_locale_day_names_hu_HU, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_hu_HU); static TYPELIB my_locale_typelib_ab_day_names_hu_HU = - { array_elements(my_locale_ab_day_names_hu_HU)-1, "", my_locale_ab_day_names_hu_HU, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_hu_HU); MY_LOCALE my_locale_hu_HU ( 27, @@ -978,13 +978,13 @@ static const char *my_locale_day_names_id_ID[8] = static const char *my_locale_ab_day_names_id_ID[8] = {"Sen","Sel","Rab","Kam","Jum","Sab","Min", NullS }; static TYPELIB my_locale_typelib_month_names_id_ID = - { array_elements(my_locale_month_names_id_ID)-1, "", my_locale_month_names_id_ID, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_id_ID); static TYPELIB my_locale_typelib_ab_month_names_id_ID = - { array_elements(my_locale_ab_month_names_id_ID)-1, "", my_locale_ab_month_names_id_ID, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_id_ID); static TYPELIB my_locale_typelib_day_names_id_ID = - { array_elements(my_locale_day_names_id_ID)-1, "", my_locale_day_names_id_ID, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_id_ID); static TYPELIB my_locale_typelib_ab_day_names_id_ID = - { array_elements(my_locale_ab_day_names_id_ID)-1, "", my_locale_ab_day_names_id_ID, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_id_ID); MY_LOCALE my_locale_id_ID ( 28, @@ -1014,13 +1014,13 @@ static const char *my_locale_day_names_is_IS[8] = static const char *my_locale_ab_day_names_is_IS[8] = {"mán","þri","mið","fim","fös","lau","sun", NullS }; static TYPELIB my_locale_typelib_month_names_is_IS = - { array_elements(my_locale_month_names_is_IS)-1, "", my_locale_month_names_is_IS, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_is_IS); static TYPELIB my_locale_typelib_ab_month_names_is_IS = - { array_elements(my_locale_ab_month_names_is_IS)-1, "", my_locale_ab_month_names_is_IS, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_is_IS); static TYPELIB my_locale_typelib_day_names_is_IS = - { array_elements(my_locale_day_names_is_IS)-1, "", my_locale_day_names_is_IS, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_is_IS); static TYPELIB my_locale_typelib_ab_day_names_is_IS = - { array_elements(my_locale_ab_day_names_is_IS)-1, "", my_locale_ab_day_names_is_IS, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_is_IS); MY_LOCALE my_locale_is_IS ( 29, @@ -1050,13 +1050,13 @@ static const char *my_locale_day_names_it_CH[8] = static const char *my_locale_ab_day_names_it_CH[8] = {"lun","mar","mer","gio","ven","sab","dom", NullS }; static TYPELIB my_locale_typelib_month_names_it_CH = - { array_elements(my_locale_month_names_it_CH)-1, "", my_locale_month_names_it_CH, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_it_CH); static TYPELIB my_locale_typelib_ab_month_names_it_CH = - { array_elements(my_locale_ab_month_names_it_CH)-1, "", my_locale_ab_month_names_it_CH, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_it_CH); static TYPELIB my_locale_typelib_day_names_it_CH = - { array_elements(my_locale_day_names_it_CH)-1, "", my_locale_day_names_it_CH, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_it_CH); static TYPELIB my_locale_typelib_ab_day_names_it_CH = - { array_elements(my_locale_ab_day_names_it_CH)-1, "", my_locale_ab_day_names_it_CH, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_it_CH); MY_LOCALE my_locale_it_CH ( 30, @@ -1086,13 +1086,13 @@ static const char *my_locale_day_names_ja_JP[8] = static const char *my_locale_ab_day_names_ja_JP[8] = {"月","火","水","木","金","土","日", NullS }; static TYPELIB my_locale_typelib_month_names_ja_JP = - { array_elements(my_locale_month_names_ja_JP)-1, "", my_locale_month_names_ja_JP, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ja_JP); static TYPELIB my_locale_typelib_ab_month_names_ja_JP = - { array_elements(my_locale_ab_month_names_ja_JP)-1, "", my_locale_ab_month_names_ja_JP, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ja_JP); static TYPELIB my_locale_typelib_day_names_ja_JP = - { array_elements(my_locale_day_names_ja_JP)-1, "", my_locale_day_names_ja_JP, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ja_JP); static TYPELIB my_locale_typelib_ab_day_names_ja_JP = - { array_elements(my_locale_ab_day_names_ja_JP)-1, "", my_locale_ab_day_names_ja_JP, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ja_JP); MY_LOCALE my_locale_ja_JP ( 2, @@ -1122,13 +1122,13 @@ static const char *my_locale_day_names_ko_KR[8] = static const char *my_locale_ab_day_names_ko_KR[8] = {"월","화","수","목","금","토","일", NullS }; static TYPELIB my_locale_typelib_month_names_ko_KR = - { array_elements(my_locale_month_names_ko_KR)-1, "", my_locale_month_names_ko_KR, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ko_KR); static TYPELIB my_locale_typelib_ab_month_names_ko_KR = - { array_elements(my_locale_ab_month_names_ko_KR)-1, "", my_locale_ab_month_names_ko_KR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ko_KR); static TYPELIB my_locale_typelib_day_names_ko_KR = - { array_elements(my_locale_day_names_ko_KR)-1, "", my_locale_day_names_ko_KR, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ko_KR); static TYPELIB my_locale_typelib_ab_day_names_ko_KR = - { array_elements(my_locale_ab_day_names_ko_KR)-1, "", my_locale_ab_day_names_ko_KR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ko_KR); MY_LOCALE my_locale_ko_KR ( 31, @@ -1158,13 +1158,13 @@ static const char *my_locale_day_names_lt_LT[8] = static const char *my_locale_ab_day_names_lt_LT[8] = {"Pr","An","Tr","Kt","Pn","Št","Sk", NullS }; static TYPELIB my_locale_typelib_month_names_lt_LT = - { array_elements(my_locale_month_names_lt_LT)-1, "", my_locale_month_names_lt_LT, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_lt_LT); static TYPELIB my_locale_typelib_ab_month_names_lt_LT = - { array_elements(my_locale_ab_month_names_lt_LT)-1, "", my_locale_ab_month_names_lt_LT, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_lt_LT); static TYPELIB my_locale_typelib_day_names_lt_LT = - { array_elements(my_locale_day_names_lt_LT)-1, "", my_locale_day_names_lt_LT, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_lt_LT); static TYPELIB my_locale_typelib_ab_day_names_lt_LT = - { array_elements(my_locale_ab_day_names_lt_LT)-1, "", my_locale_ab_day_names_lt_LT, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_lt_LT); MY_LOCALE my_locale_lt_LT ( 32, @@ -1194,13 +1194,13 @@ static const char *my_locale_day_names_lv_LV[8] = static const char *my_locale_ab_day_names_lv_LV[8] = {"P ","O ","T ","C ","Pk","S ","Sv", NullS }; static TYPELIB my_locale_typelib_month_names_lv_LV = - { array_elements(my_locale_month_names_lv_LV)-1, "", my_locale_month_names_lv_LV, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_lv_LV); static TYPELIB my_locale_typelib_ab_month_names_lv_LV = - { array_elements(my_locale_ab_month_names_lv_LV)-1, "", my_locale_ab_month_names_lv_LV, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_lv_LV); static TYPELIB my_locale_typelib_day_names_lv_LV = - { array_elements(my_locale_day_names_lv_LV)-1, "", my_locale_day_names_lv_LV, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_lv_LV); static TYPELIB my_locale_typelib_ab_day_names_lv_LV = - { array_elements(my_locale_ab_day_names_lv_LV)-1, "", my_locale_ab_day_names_lv_LV, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_lv_LV); MY_LOCALE my_locale_lv_LV ( 33, @@ -1230,13 +1230,13 @@ static const char *my_locale_day_names_mk_MK[8] = static const char *my_locale_ab_day_names_mk_MK[8] = {"пон","вто","сре","чет","пет","саб","нед", NullS }; static TYPELIB my_locale_typelib_month_names_mk_MK = - { array_elements(my_locale_month_names_mk_MK)-1, "", my_locale_month_names_mk_MK, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_mk_MK); static TYPELIB my_locale_typelib_ab_month_names_mk_MK = - { array_elements(my_locale_ab_month_names_mk_MK)-1, "", my_locale_ab_month_names_mk_MK, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_mk_MK); static TYPELIB my_locale_typelib_day_names_mk_MK = - { array_elements(my_locale_day_names_mk_MK)-1, "", my_locale_day_names_mk_MK, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_mk_MK); static TYPELIB my_locale_typelib_ab_day_names_mk_MK = - { array_elements(my_locale_ab_day_names_mk_MK)-1, "", my_locale_ab_day_names_mk_MK, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_mk_MK); MY_LOCALE my_locale_mk_MK ( 34, @@ -1266,13 +1266,13 @@ static const char *my_locale_day_names_mn_MN[8] = static const char *my_locale_ab_day_names_mn_MN[8] = {"Да","Мя","Лх","Пү","Ба","Бя","Ня", NullS }; static TYPELIB my_locale_typelib_month_names_mn_MN = - { array_elements(my_locale_month_names_mn_MN)-1, "", my_locale_month_names_mn_MN, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_mn_MN); static TYPELIB my_locale_typelib_ab_month_names_mn_MN = - { array_elements(my_locale_ab_month_names_mn_MN)-1, "", my_locale_ab_month_names_mn_MN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_mn_MN); static TYPELIB my_locale_typelib_day_names_mn_MN = - { array_elements(my_locale_day_names_mn_MN)-1, "", my_locale_day_names_mn_MN, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_mn_MN); static TYPELIB my_locale_typelib_ab_day_names_mn_MN = - { array_elements(my_locale_ab_day_names_mn_MN)-1, "", my_locale_ab_day_names_mn_MN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_mn_MN); MY_LOCALE my_locale_mn_MN ( 35, @@ -1302,13 +1302,13 @@ static const char *my_locale_day_names_ms_MY[8] = static const char *my_locale_ab_day_names_ms_MY[8] = {"Isn","Sel","Rab","Kha","Jum","Sab","Ahd", NullS }; static TYPELIB my_locale_typelib_month_names_ms_MY = - { array_elements(my_locale_month_names_ms_MY)-1, "", my_locale_month_names_ms_MY, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ms_MY); static TYPELIB my_locale_typelib_ab_month_names_ms_MY = - { array_elements(my_locale_ab_month_names_ms_MY)-1, "", my_locale_ab_month_names_ms_MY, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ms_MY); static TYPELIB my_locale_typelib_day_names_ms_MY = - { array_elements(my_locale_day_names_ms_MY)-1, "", my_locale_day_names_ms_MY, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ms_MY); static TYPELIB my_locale_typelib_ab_day_names_ms_MY = - { array_elements(my_locale_ab_day_names_ms_MY)-1, "", my_locale_ab_day_names_ms_MY, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ms_MY); MY_LOCALE my_locale_ms_MY ( 36, @@ -1338,13 +1338,13 @@ static const char *my_locale_day_names_nb_NO[8] = static const char *my_locale_ab_day_names_nb_NO[8] = {"man","tir","ons","tor","fre","lør","søn", NullS }; static TYPELIB my_locale_typelib_month_names_nb_NO = - { array_elements(my_locale_month_names_nb_NO)-1, "", my_locale_month_names_nb_NO, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_nb_NO); static TYPELIB my_locale_typelib_ab_month_names_nb_NO = - { array_elements(my_locale_ab_month_names_nb_NO)-1, "", my_locale_ab_month_names_nb_NO, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_nb_NO); static TYPELIB my_locale_typelib_day_names_nb_NO = - { array_elements(my_locale_day_names_nb_NO)-1, "", my_locale_day_names_nb_NO, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_nb_NO); static TYPELIB my_locale_typelib_ab_day_names_nb_NO = - { array_elements(my_locale_ab_day_names_nb_NO)-1, "", my_locale_ab_day_names_nb_NO, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_nb_NO); MY_LOCALE my_locale_nb_NO ( 37, @@ -1374,13 +1374,13 @@ static const char *my_locale_day_names_nl_NL[8] = static const char *my_locale_ab_day_names_nl_NL[8] = {"ma","di","wo","do","vr","za","zo", NullS }; static TYPELIB my_locale_typelib_month_names_nl_NL = - { array_elements(my_locale_month_names_nl_NL)-1, "", my_locale_month_names_nl_NL, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_nl_NL); static TYPELIB my_locale_typelib_ab_month_names_nl_NL = - { array_elements(my_locale_ab_month_names_nl_NL)-1, "", my_locale_ab_month_names_nl_NL, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_nl_NL); static TYPELIB my_locale_typelib_day_names_nl_NL = - { array_elements(my_locale_day_names_nl_NL)-1, "", my_locale_day_names_nl_NL, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_nl_NL); static TYPELIB my_locale_typelib_ab_day_names_nl_NL = - { array_elements(my_locale_ab_day_names_nl_NL)-1, "", my_locale_ab_day_names_nl_NL, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_nl_NL); MY_LOCALE my_locale_nl_NL ( 38, @@ -1410,13 +1410,13 @@ static const char *my_locale_day_names_pl_PL[8] = static const char *my_locale_ab_day_names_pl_PL[8] = {"pon","wto","śro","czw","pią","sob","nie", NullS }; static TYPELIB my_locale_typelib_month_names_pl_PL = - { array_elements(my_locale_month_names_pl_PL)-1, "", my_locale_month_names_pl_PL, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_pl_PL); static TYPELIB my_locale_typelib_ab_month_names_pl_PL = - { array_elements(my_locale_ab_month_names_pl_PL)-1, "", my_locale_ab_month_names_pl_PL, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_pl_PL); static TYPELIB my_locale_typelib_day_names_pl_PL = - { array_elements(my_locale_day_names_pl_PL)-1, "", my_locale_day_names_pl_PL, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_pl_PL); static TYPELIB my_locale_typelib_ab_day_names_pl_PL = - { array_elements(my_locale_ab_day_names_pl_PL)-1, "", my_locale_ab_day_names_pl_PL, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_pl_PL); MY_LOCALE my_locale_pl_PL ( 39, @@ -1446,13 +1446,13 @@ static const char *my_locale_day_names_pt_BR[8] = static const char *my_locale_ab_day_names_pt_BR[8] = {"Seg","Ter","Qua","Qui","Sex","Sáb","Dom", NullS }; static TYPELIB my_locale_typelib_month_names_pt_BR = - { array_elements(my_locale_month_names_pt_BR)-1, "", my_locale_month_names_pt_BR, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_pt_BR); static TYPELIB my_locale_typelib_ab_month_names_pt_BR = - { array_elements(my_locale_ab_month_names_pt_BR)-1, "", my_locale_ab_month_names_pt_BR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_pt_BR); static TYPELIB my_locale_typelib_day_names_pt_BR = - { array_elements(my_locale_day_names_pt_BR)-1, "", my_locale_day_names_pt_BR, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_pt_BR); static TYPELIB my_locale_typelib_ab_day_names_pt_BR = - { array_elements(my_locale_ab_day_names_pt_BR)-1, "", my_locale_ab_day_names_pt_BR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_pt_BR); MY_LOCALE my_locale_pt_BR ( 40, @@ -1482,13 +1482,13 @@ static const char *my_locale_day_names_pt_PT[8] = static const char *my_locale_ab_day_names_pt_PT[8] = {"Seg","Ter","Qua","Qui","Sex","Sáb","Dom", NullS }; static TYPELIB my_locale_typelib_month_names_pt_PT = - { array_elements(my_locale_month_names_pt_PT)-1, "", my_locale_month_names_pt_PT, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_pt_PT); static TYPELIB my_locale_typelib_ab_month_names_pt_PT = - { array_elements(my_locale_ab_month_names_pt_PT)-1, "", my_locale_ab_month_names_pt_PT, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_pt_PT); static TYPELIB my_locale_typelib_day_names_pt_PT = - { array_elements(my_locale_day_names_pt_PT)-1, "", my_locale_day_names_pt_PT, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_pt_PT); static TYPELIB my_locale_typelib_ab_day_names_pt_PT = - { array_elements(my_locale_ab_day_names_pt_PT)-1, "", my_locale_ab_day_names_pt_PT, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_pt_PT); MY_LOCALE my_locale_pt_PT ( 41, @@ -1518,13 +1518,13 @@ static const char *my_locale_day_names_ro_RO[8] = static const char *my_locale_ab_day_names_ro_RO[8] = {"Lu","Ma","Mi","Jo","Vi","Sâ","Du", NullS }; static TYPELIB my_locale_typelib_month_names_ro_RO = - { array_elements(my_locale_month_names_ro_RO)-1, "", my_locale_month_names_ro_RO, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ro_RO); static TYPELIB my_locale_typelib_ab_month_names_ro_RO = - { array_elements(my_locale_ab_month_names_ro_RO)-1, "", my_locale_ab_month_names_ro_RO, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ro_RO); static TYPELIB my_locale_typelib_day_names_ro_RO = - { array_elements(my_locale_day_names_ro_RO)-1, "", my_locale_day_names_ro_RO, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ro_RO); static TYPELIB my_locale_typelib_ab_day_names_ro_RO = - { array_elements(my_locale_ab_day_names_ro_RO)-1, "", my_locale_ab_day_names_ro_RO, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ro_RO); MY_LOCALE my_locale_ro_RO ( 42, @@ -1554,13 +1554,13 @@ static const char *my_locale_day_names_ru_RU[8] = static const char *my_locale_ab_day_names_ru_RU[8] = {"Пнд","Втр","Срд","Чтв","Птн","Сбт","Вск", NullS }; static TYPELIB my_locale_typelib_month_names_ru_RU = - { array_elements(my_locale_month_names_ru_RU)-1, "", my_locale_month_names_ru_RU, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ru_RU); static TYPELIB my_locale_typelib_ab_month_names_ru_RU = - { array_elements(my_locale_ab_month_names_ru_RU)-1, "", my_locale_ab_month_names_ru_RU, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ru_RU); static TYPELIB my_locale_typelib_day_names_ru_RU = - { array_elements(my_locale_day_names_ru_RU)-1, "", my_locale_day_names_ru_RU, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ru_RU); static TYPELIB my_locale_typelib_ab_day_names_ru_RU = - { array_elements(my_locale_ab_day_names_ru_RU)-1, "", my_locale_ab_day_names_ru_RU, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ru_RU); MY_LOCALE my_locale_ru_RU ( 43, @@ -1590,13 +1590,13 @@ static const char *my_locale_day_names_ru_UA[8] = static const char *my_locale_ab_day_names_ru_UA[8] = {"Пнд","Вто","Срд","Чтв","Птн","Суб","Вск", NullS }; static TYPELIB my_locale_typelib_month_names_ru_UA = - { array_elements(my_locale_month_names_ru_UA)-1, "", my_locale_month_names_ru_UA, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ru_UA); static TYPELIB my_locale_typelib_ab_month_names_ru_UA = - { array_elements(my_locale_ab_month_names_ru_UA)-1, "", my_locale_ab_month_names_ru_UA, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ru_UA); static TYPELIB my_locale_typelib_day_names_ru_UA = - { array_elements(my_locale_day_names_ru_UA)-1, "", my_locale_day_names_ru_UA, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ru_UA); static TYPELIB my_locale_typelib_ab_day_names_ru_UA = - { array_elements(my_locale_ab_day_names_ru_UA)-1, "", my_locale_ab_day_names_ru_UA, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ru_UA); MY_LOCALE my_locale_ru_UA ( 44, @@ -1626,13 +1626,13 @@ static const char *my_locale_day_names_sk_SK[8] = static const char *my_locale_ab_day_names_sk_SK[8] = {"Po","Ut","St","Št","Pi","So","Ne", NullS }; static TYPELIB my_locale_typelib_month_names_sk_SK = - { array_elements(my_locale_month_names_sk_SK)-1, "", my_locale_month_names_sk_SK, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_sk_SK); static TYPELIB my_locale_typelib_ab_month_names_sk_SK = - { array_elements(my_locale_ab_month_names_sk_SK)-1, "", my_locale_ab_month_names_sk_SK, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_sk_SK); static TYPELIB my_locale_typelib_day_names_sk_SK = - { array_elements(my_locale_day_names_sk_SK)-1, "", my_locale_day_names_sk_SK, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_sk_SK); static TYPELIB my_locale_typelib_ab_day_names_sk_SK = - { array_elements(my_locale_ab_day_names_sk_SK)-1, "", my_locale_ab_day_names_sk_SK, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_sk_SK); MY_LOCALE my_locale_sk_SK ( 45, @@ -1662,13 +1662,13 @@ static const char *my_locale_day_names_sl_SI[8] = static const char *my_locale_ab_day_names_sl_SI[8] = {"pon","tor","sre","čet","pet","sob","ned", NullS }; static TYPELIB my_locale_typelib_month_names_sl_SI = - { array_elements(my_locale_month_names_sl_SI)-1, "", my_locale_month_names_sl_SI, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_sl_SI); static TYPELIB my_locale_typelib_ab_month_names_sl_SI = - { array_elements(my_locale_ab_month_names_sl_SI)-1, "", my_locale_ab_month_names_sl_SI, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_sl_SI); static TYPELIB my_locale_typelib_day_names_sl_SI = - { array_elements(my_locale_day_names_sl_SI)-1, "", my_locale_day_names_sl_SI, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_sl_SI); static TYPELIB my_locale_typelib_ab_day_names_sl_SI = - { array_elements(my_locale_ab_day_names_sl_SI)-1, "", my_locale_ab_day_names_sl_SI, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_sl_SI); MY_LOCALE my_locale_sl_SI ( 46, @@ -1698,13 +1698,13 @@ static const char *my_locale_day_names_sq_AL[8] = static const char *my_locale_ab_day_names_sq_AL[8] = {"Hën ","Mar ","Mër ","Enj ","Pre ","Sht ","Die ", NullS }; static TYPELIB my_locale_typelib_month_names_sq_AL = - { array_elements(my_locale_month_names_sq_AL)-1, "", my_locale_month_names_sq_AL, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_sq_AL); static TYPELIB my_locale_typelib_ab_month_names_sq_AL = - { array_elements(my_locale_ab_month_names_sq_AL)-1, "", my_locale_ab_month_names_sq_AL, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_sq_AL); static TYPELIB my_locale_typelib_day_names_sq_AL = - { array_elements(my_locale_day_names_sq_AL)-1, "", my_locale_day_names_sq_AL, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_sq_AL); static TYPELIB my_locale_typelib_ab_day_names_sq_AL = - { array_elements(my_locale_ab_day_names_sq_AL)-1, "", my_locale_ab_day_names_sq_AL, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_sq_AL); MY_LOCALE my_locale_sq_AL ( 47, @@ -1734,13 +1734,13 @@ static const char *my_locale_day_names_sr_RS[8] = static const char *my_locale_ab_day_names_sr_RS[8] = {"pon","uto","sre","čet","pet","sub","ned", NullS }; static TYPELIB my_locale_typelib_month_names_sr_RS = - { array_elements(my_locale_month_names_sr_RS)-1, "", my_locale_month_names_sr_RS, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_sr_RS); static TYPELIB my_locale_typelib_ab_month_names_sr_RS = - { array_elements(my_locale_ab_month_names_sr_RS)-1, "", my_locale_ab_month_names_sr_RS, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_sr_RS); static TYPELIB my_locale_typelib_day_names_sr_RS = - { array_elements(my_locale_day_names_sr_RS)-1, "", my_locale_day_names_sr_RS, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_sr_RS); static TYPELIB my_locale_typelib_ab_day_names_sr_RS = - { array_elements(my_locale_ab_day_names_sr_RS)-1, "", my_locale_ab_day_names_sr_RS, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_sr_RS); MY_LOCALE my_locale_sr_RS ( @@ -1771,13 +1771,13 @@ static const char *my_locale_day_names_sv_SE[8] = static const char *my_locale_ab_day_names_sv_SE[8] = {"mån","tis","ons","tor","fre","lör","sön", NullS }; static TYPELIB my_locale_typelib_month_names_sv_SE = - { array_elements(my_locale_month_names_sv_SE)-1, "", my_locale_month_names_sv_SE, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_sv_SE); static TYPELIB my_locale_typelib_ab_month_names_sv_SE = - { array_elements(my_locale_ab_month_names_sv_SE)-1, "", my_locale_ab_month_names_sv_SE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_sv_SE); static TYPELIB my_locale_typelib_day_names_sv_SE = - { array_elements(my_locale_day_names_sv_SE)-1, "", my_locale_day_names_sv_SE, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_sv_SE); static TYPELIB my_locale_typelib_ab_day_names_sv_SE = - { array_elements(my_locale_ab_day_names_sv_SE)-1, "", my_locale_ab_day_names_sv_SE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_sv_SE); MY_LOCALE my_locale_sv_SE ( 3, @@ -1807,13 +1807,13 @@ static const char *my_locale_day_names_ta_IN[8] = static const char *my_locale_ab_day_names_ta_IN[8] = {"த","ச","ப","வ","வ","ச","ஞ", NullS }; static TYPELIB my_locale_typelib_month_names_ta_IN = - { array_elements(my_locale_month_names_ta_IN)-1, "", my_locale_month_names_ta_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ta_IN); static TYPELIB my_locale_typelib_ab_month_names_ta_IN = - { array_elements(my_locale_ab_month_names_ta_IN)-1, "", my_locale_ab_month_names_ta_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ta_IN); static TYPELIB my_locale_typelib_day_names_ta_IN = - { array_elements(my_locale_day_names_ta_IN)-1, "", my_locale_day_names_ta_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ta_IN); static TYPELIB my_locale_typelib_ab_day_names_ta_IN = - { array_elements(my_locale_ab_day_names_ta_IN)-1, "", my_locale_ab_day_names_ta_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ta_IN); MY_LOCALE my_locale_ta_IN ( 49, @@ -1843,13 +1843,13 @@ static const char *my_locale_day_names_te_IN[8] = static const char *my_locale_ab_day_names_te_IN[8] = {"సోమ","మంగళ","బుధ","గురు","శుక్ర","శని","ఆది", NullS }; static TYPELIB my_locale_typelib_month_names_te_IN = - { array_elements(my_locale_month_names_te_IN)-1, "", my_locale_month_names_te_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_te_IN); static TYPELIB my_locale_typelib_ab_month_names_te_IN = - { array_elements(my_locale_ab_month_names_te_IN)-1, "", my_locale_ab_month_names_te_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_te_IN); static TYPELIB my_locale_typelib_day_names_te_IN = - { array_elements(my_locale_day_names_te_IN)-1, "", my_locale_day_names_te_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_te_IN); static TYPELIB my_locale_typelib_ab_day_names_te_IN = - { array_elements(my_locale_ab_day_names_te_IN)-1, "", my_locale_ab_day_names_te_IN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_te_IN); MY_LOCALE my_locale_te_IN ( 50, @@ -1879,13 +1879,13 @@ static const char *my_locale_day_names_th_TH[8] = static const char *my_locale_ab_day_names_th_TH[8] = {"จ.","อ.","พ.","พฤ.","ศ.","ส.","อา.", NullS }; static TYPELIB my_locale_typelib_month_names_th_TH = - { array_elements(my_locale_month_names_th_TH)-1, "", my_locale_month_names_th_TH, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_th_TH); static TYPELIB my_locale_typelib_ab_month_names_th_TH = - { array_elements(my_locale_ab_month_names_th_TH)-1, "", my_locale_ab_month_names_th_TH, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_th_TH); static TYPELIB my_locale_typelib_day_names_th_TH = - { array_elements(my_locale_day_names_th_TH)-1, "", my_locale_day_names_th_TH, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_th_TH); static TYPELIB my_locale_typelib_ab_day_names_th_TH = - { array_elements(my_locale_ab_day_names_th_TH)-1, "", my_locale_ab_day_names_th_TH, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_th_TH); MY_LOCALE my_locale_th_TH ( 51, @@ -1915,13 +1915,13 @@ static const char *my_locale_day_names_tr_TR[8] = static const char *my_locale_ab_day_names_tr_TR[8] = {"Pzt","Sal","Çrş","Prş","Cum","Cts","Paz", NullS }; static TYPELIB my_locale_typelib_month_names_tr_TR = - { array_elements(my_locale_month_names_tr_TR)-1, "", my_locale_month_names_tr_TR, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_tr_TR); static TYPELIB my_locale_typelib_ab_month_names_tr_TR = - { array_elements(my_locale_ab_month_names_tr_TR)-1, "", my_locale_ab_month_names_tr_TR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_tr_TR); static TYPELIB my_locale_typelib_day_names_tr_TR = - { array_elements(my_locale_day_names_tr_TR)-1, "", my_locale_day_names_tr_TR, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_tr_TR); static TYPELIB my_locale_typelib_ab_day_names_tr_TR = - { array_elements(my_locale_ab_day_names_tr_TR)-1, "", my_locale_ab_day_names_tr_TR, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_tr_TR); MY_LOCALE my_locale_tr_TR ( 52, @@ -1951,13 +1951,13 @@ static const char *my_locale_day_names_uk_UA[8] = static const char *my_locale_ab_day_names_uk_UA[8] = {"Пнд","Втр","Срд","Чтв","Птн","Сбт","Ндл", NullS }; static TYPELIB my_locale_typelib_month_names_uk_UA = - { array_elements(my_locale_month_names_uk_UA)-1, "", my_locale_month_names_uk_UA, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_uk_UA); static TYPELIB my_locale_typelib_ab_month_names_uk_UA = - { array_elements(my_locale_ab_month_names_uk_UA)-1, "", my_locale_ab_month_names_uk_UA, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_uk_UA); static TYPELIB my_locale_typelib_day_names_uk_UA = - { array_elements(my_locale_day_names_uk_UA)-1, "", my_locale_day_names_uk_UA, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_uk_UA); static TYPELIB my_locale_typelib_ab_day_names_uk_UA = - { array_elements(my_locale_ab_day_names_uk_UA)-1, "", my_locale_ab_day_names_uk_UA, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_uk_UA); MY_LOCALE my_locale_uk_UA ( 53, @@ -1987,13 +1987,13 @@ static const char *my_locale_day_names_ur_PK[8] = static const char *my_locale_ab_day_names_ur_PK[8] = {"پير","منگل","بدھ","جمعرات","جمعه","هفته","اتوار", NullS }; static TYPELIB my_locale_typelib_month_names_ur_PK = - { array_elements(my_locale_month_names_ur_PK)-1, "", my_locale_month_names_ur_PK, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ur_PK); static TYPELIB my_locale_typelib_ab_month_names_ur_PK = - { array_elements(my_locale_ab_month_names_ur_PK)-1, "", my_locale_ab_month_names_ur_PK, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ur_PK); static TYPELIB my_locale_typelib_day_names_ur_PK = - { array_elements(my_locale_day_names_ur_PK)-1, "", my_locale_day_names_ur_PK, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ur_PK); static TYPELIB my_locale_typelib_ab_day_names_ur_PK = - { array_elements(my_locale_ab_day_names_ur_PK)-1, "", my_locale_ab_day_names_ur_PK, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ur_PK); MY_LOCALE my_locale_ur_PK ( 54, @@ -2023,13 +2023,13 @@ static const char *my_locale_day_names_vi_VN[8] = static const char *my_locale_ab_day_names_vi_VN[8] = {"Th 2 ","Th 3 ","Th 4 ","Th 5 ","Th 6 ","Th 7 ","CN ", NullS }; static TYPELIB my_locale_typelib_month_names_vi_VN = - { array_elements(my_locale_month_names_vi_VN)-1, "", my_locale_month_names_vi_VN, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_vi_VN); static TYPELIB my_locale_typelib_ab_month_names_vi_VN = - { array_elements(my_locale_ab_month_names_vi_VN)-1, "", my_locale_ab_month_names_vi_VN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_vi_VN); static TYPELIB my_locale_typelib_day_names_vi_VN = - { array_elements(my_locale_day_names_vi_VN)-1, "", my_locale_day_names_vi_VN, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_vi_VN); static TYPELIB my_locale_typelib_ab_day_names_vi_VN = - { array_elements(my_locale_ab_day_names_vi_VN)-1, "", my_locale_ab_day_names_vi_VN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_vi_VN); MY_LOCALE my_locale_vi_VN ( 55, @@ -2059,13 +2059,13 @@ static const char *my_locale_day_names_zh_CN[8] = static const char *my_locale_ab_day_names_zh_CN[8] = {"一","二","三","四","五","六","日", NullS }; static TYPELIB my_locale_typelib_month_names_zh_CN = - { array_elements(my_locale_month_names_zh_CN)-1, "", my_locale_month_names_zh_CN, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_zh_CN); static TYPELIB my_locale_typelib_ab_month_names_zh_CN = - { array_elements(my_locale_ab_month_names_zh_CN)-1, "", my_locale_ab_month_names_zh_CN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_zh_CN); static TYPELIB my_locale_typelib_day_names_zh_CN = - { array_elements(my_locale_day_names_zh_CN)-1, "", my_locale_day_names_zh_CN, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_zh_CN); static TYPELIB my_locale_typelib_ab_day_names_zh_CN = - { array_elements(my_locale_ab_day_names_zh_CN)-1, "", my_locale_ab_day_names_zh_CN, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_zh_CN); MY_LOCALE my_locale_zh_CN ( 56, @@ -2095,13 +2095,13 @@ static const char *my_locale_day_names_zh_TW[8] = static const char *my_locale_ab_day_names_zh_TW[8] = {"一","二","三","四","五","六","日", NullS }; static TYPELIB my_locale_typelib_month_names_zh_TW = - { array_elements(my_locale_month_names_zh_TW)-1, "", my_locale_month_names_zh_TW, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_zh_TW); static TYPELIB my_locale_typelib_ab_month_names_zh_TW = - { array_elements(my_locale_ab_month_names_zh_TW)-1, "", my_locale_ab_month_names_zh_TW, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_zh_TW); static TYPELIB my_locale_typelib_day_names_zh_TW = - { array_elements(my_locale_day_names_zh_TW)-1, "", my_locale_day_names_zh_TW, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_zh_TW); static TYPELIB my_locale_typelib_ab_day_names_zh_TW = - { array_elements(my_locale_ab_day_names_zh_TW)-1, "", my_locale_ab_day_names_zh_TW, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_zh_TW); MY_LOCALE my_locale_zh_TW ( 57, @@ -3331,16 +3331,16 @@ static const char *my_locale_ab_day_names_ka_GE[8] = {"ორშ","სამშ","ოთხშ","ხუთშ","პარ","შაბ","კვ", NullS }; static TYPELIB my_locale_typelib_month_names_ka_GE = - { array_elements(my_locale_month_names_ka_GE)-1, "", my_locale_month_names_ka_GE, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_ka_GE); static TYPELIB my_locale_typelib_ab_month_names_ka_GE = - { array_elements(my_locale_ab_month_names_ka_GE)-1, "", my_locale_ab_month_names_ka_GE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_ka_GE); static TYPELIB my_locale_typelib_day_names_ka_GE = - { array_elements(my_locale_day_names_ka_GE)-1, "", my_locale_day_names_ka_GE, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_ka_GE); static TYPELIB my_locale_typelib_ab_day_names_ka_GE = - { array_elements(my_locale_ab_day_names_ka_GE)-1, "", my_locale_ab_day_names_ka_GE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_ka_GE); MY_LOCALE my_locale_ka_GE ( @@ -3371,13 +3371,13 @@ static const char *my_locale_day_names_sw_KE[8] = static const char *my_locale_ab_day_names_sw_KE[8] = {"Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi", "Jumapili", NullS }; static TYPELIB my_locale_typelib_month_names_sw_KE = - { array_elements(my_locale_month_names_sw_KE)-1, "", my_locale_month_names_sw_KE, NULL }; + CREATE_TYPELIB_FOR(my_locale_month_names_sw_KE); static TYPELIB my_locale_typelib_ab_month_names_sw_KE = - { array_elements(my_locale_ab_month_names_sw_KE)-1, "", my_locale_ab_month_names_sw_KE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_month_names_sw_KE); static TYPELIB my_locale_typelib_day_names_sw_KE = - { array_elements(my_locale_day_names_sw_KE)-1, "", my_locale_day_names_sw_KE, NULL }; + CREATE_TYPELIB_FOR(my_locale_day_names_sw_KE); static TYPELIB my_locale_typelib_ab_day_names_sw_KE = - { array_elements(my_locale_ab_day_names_sw_KE)-1, "", my_locale_ab_day_names_sw_KE, NULL }; + CREATE_TYPELIB_FOR(my_locale_ab_day_names_sw_KE); MY_LOCALE my_locale_sw_KE ( 112, diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 5ce7dc57b23..6f3046f3441 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -62,8 +62,7 @@ extern struct st_maria_plugin *mysql_mandatory_plugins[]; const char *global_plugin_typelib_names[]= { "OFF", "ON", "FORCE", "FORCE_PLUS_PERMANENT", NULL }; static TYPELIB global_plugin_typelib= - { array_elements(global_plugin_typelib_names)-1, - "", global_plugin_typelib_names, NULL }; + CREATE_TYPELIB_FOR(global_plugin_typelib_names); static I_List opt_plugin_load_list; I_List *opt_plugin_load_list_ptr= &opt_plugin_load_list; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 92eefc91cca..a5a2c0aa3d9 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -140,10 +140,7 @@ LEX_CSTRING INDEX_clex_str= { STRING_WITH_LEN("INDEX") }; static const char *grant_names[]={ "select","insert","update","delete","create","drop","reload","shutdown", "process","file","grant","references","index","alter"}; - -static TYPELIB grant_types = { sizeof(grant_names)/sizeof(char **), - "grant_types", - grant_names, NULL}; +static TYPELIB grant_types = CREATE_TYPELIB_FOR(grant_names); #endif /* Match the values of enum ha_choice */ diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 2bf4f978929..b3e724c3acb 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2521,12 +2521,8 @@ Sys_var_slave_parallel_mode::global_value_ptr(THD *thd, static const char *slave_parallel_mode_names[] = { "none", "minimal", "conservative", "optimistic", "aggressive", NULL }; -export TYPELIB slave_parallel_mode_typelib = { - array_elements(slave_parallel_mode_names)-1, - "", - slave_parallel_mode_names, - NULL -}; +export TYPELIB slave_parallel_mode_typelib = + CREATE_TYPELIB_FOR(slave_parallel_mode_names); static Sys_var_on_access_global diff --git a/sql/sys_vars.inl b/sql/sys_vars.inl index 600e3f8f931..99423055221 100644 --- a/sql/sys_vars.inl +++ b/sql/sys_vars.inl @@ -105,7 +105,7 @@ extern const char *UNUSED_HELP; static const char *bool_values[3]= {"OFF", "ON", 0}; -TYPELIB bool_typelib={ array_elements(bool_values)-1, "", bool_values, 0 }; +TYPELIB bool_typelib= CREATE_TYPELIB_FOR(bool_values); template diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 888d512e0dd..d985c5b9796 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -305,11 +305,7 @@ const char *xtrace_names[] = "QUERY", "STMT", "HANDLER", "BLOCK", "MONGO", NullS }; -TYPELIB xtrace_typelib = -{ - array_elements(xtrace_names) - 1, "xtrace_typelib", - xtrace_names, NULL -}; +TYPELIB xtrace_typelib = CREATE_TYPELIB_FOR(xtrace_names); static MYSQL_THDVAR_SET( xtrace, // name @@ -343,11 +339,7 @@ const char *usetemp_names[]= "NO", "AUTO", "YES", "FORCE", "TEST", NullS }; -TYPELIB usetemp_typelib= -{ - array_elements(usetemp_names) - 1, "usetemp_typelib", - usetemp_names, NULL -}; +TYPELIB usetemp_typelib= CREATE_TYPELIB_FOR(usetemp_names); static MYSQL_THDVAR_ENUM( use_tempfile, // name @@ -390,11 +382,7 @@ const char *xconv_names[]= "NO", "YES", "FORCE", "SKIP", NullS }; -TYPELIB xconv_typelib= -{ - array_elements(xconv_names) - 1, "xconv_typelib", - xconv_names, NULL -}; +TYPELIB xconv_typelib= CREATE_TYPELIB_FOR(xconv_names); static MYSQL_THDVAR_ENUM( type_conv, // name @@ -469,11 +457,7 @@ const char *language_names[]= "default", "english", "french", NullS }; -TYPELIB language_typelib= -{ - array_elements(language_names) - 1, "language_typelib", - language_names, NULL -}; +TYPELIB language_typelib= CREATE_TYPELIB_FOR(language_names); static MYSQL_THDVAR_ENUM( msg_lang, // name diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index adcce268214..56157e88d1f 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -1000,11 +1000,7 @@ const char *enum_var_names[]= "e1", "e2", NullS }; -TYPELIB enum_var_typelib= -{ - array_elements(enum_var_names) - 1, "enum_var_typelib", - enum_var_names, NULL -}; +TYPELIB enum_var_typelib= CREATE_TYPELIB_FOR(enum_var_names); static MYSQL_SYSVAR_ENUM( enum_var, // name diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 1cad2a66d86..e00dda75982 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -310,12 +310,8 @@ static const char* innodb_stats_method_names[] = { /** Used to define an enumerate type of the system variable innodb_stats_method. This is the same as "myisam_stats_method_typelib" */ -static TYPELIB innodb_stats_method_typelib = { - array_elements(innodb_stats_method_names) - 1, - "innodb_stats_method_typelib", - innodb_stats_method_names, - NULL -}; +static TYPELIB innodb_stats_method_typelib = + CREATE_TYPELIB_FOR(innodb_stats_method_names); /** Possible values of the parameter innodb_checksum_algorithm */ const char* innodb_checksum_algorithm_names[] = { @@ -328,12 +324,8 @@ const char* innodb_checksum_algorithm_names[] = { /** Used to define an enumerate type of the system variable innodb_checksum_algorithm. */ -TYPELIB innodb_checksum_algorithm_typelib = { - array_elements(innodb_checksum_algorithm_names) - 1, - "innodb_checksum_algorithm_typelib", - innodb_checksum_algorithm_names, - NULL -}; +TYPELIB innodb_checksum_algorithm_typelib = + CREATE_TYPELIB_FOR(innodb_checksum_algorithm_names); /** Possible values for system variable "innodb_default_row_format". */ static const char* innodb_default_row_format_names[] = { @@ -345,12 +337,8 @@ static const char* innodb_default_row_format_names[] = { /** Used to define an enumerate type of the system variable innodb_default_row_format. */ -static TYPELIB innodb_default_row_format_typelib = { - array_elements(innodb_default_row_format_names) - 1, - "innodb_default_row_format_typelib", - innodb_default_row_format_names, - NULL -}; +static TYPELIB innodb_default_row_format_typelib = + CREATE_TYPELIB_FOR(innodb_default_row_format_names); /** Names of allowed values of innodb_flush_method */ static const char* innodb_flush_method_names[] = { @@ -371,12 +359,8 @@ static const char* innodb_flush_method_names[] = { static constexpr ulong innodb_flush_method_default = IF_WIN(6,4); /** Enumeration of innodb_flush_method */ -TYPELIB innodb_flush_method_typelib = { - array_elements(innodb_flush_method_names) - 1, - "innodb_flush_method_typelib", - innodb_flush_method_names, - NULL -}; +TYPELIB innodb_flush_method_typelib = + CREATE_TYPELIB_FOR(innodb_flush_method_names); /** Deprecated parameter */ static ulong innodb_flush_method; @@ -386,12 +370,8 @@ static const char *innodb_doublewrite_names[]= {"OFF", "ON", "fast", nullptr}; /** Enumeration of innodb_doublewrite */ -TYPELIB innodb_doublewrite_typelib= { - array_elements(innodb_doublewrite_names) - 1, - "innodb_doublewrite_typelib", - innodb_doublewrite_names, - nullptr -}; +TYPELIB innodb_doublewrite_typelib= + CREATE_TYPELIB_FOR(innodb_doublewrite_names); /** Names of allowed values of innodb_deadlock_report */ static const char *innodb_deadlock_report_names[]= { @@ -406,12 +386,8 @@ static_assert(Deadlock::REPORT_BASIC == 1, "compatibility"); static_assert(Deadlock::REPORT_FULL == 2, "compatibility"); /** Enumeration of innodb_deadlock_report */ -static TYPELIB innodb_deadlock_report_typelib = { - array_elements(innodb_deadlock_report_names) - 1, - "innodb_deadlock_report_typelib", - innodb_deadlock_report_names, - NULL -}; +static TYPELIB innodb_deadlock_report_typelib = + CREATE_TYPELIB_FOR(innodb_deadlock_report_names); /** Allowed values of innodb_instant_alter_column_allowed */ const char* innodb_instant_alter_column_allowed_names[] = { @@ -422,12 +398,8 @@ const char* innodb_instant_alter_column_allowed_names[] = { }; /** Enumeration of innodb_instant_alter_column_allowed */ -static TYPELIB innodb_instant_alter_column_allowed_typelib = { - array_elements(innodb_instant_alter_column_allowed_names) - 1, - "innodb_instant_alter_column_allowed_typelib", - innodb_instant_alter_column_allowed_names, - NULL -}; +static TYPELIB innodb_instant_alter_column_allowed_typelib = + CREATE_TYPELIB_FOR(innodb_instant_alter_column_allowed_names); /** Retrieve the FTS Relevance Ranking result for doc with doc_id of m_prebuilt->fts_doc_id @@ -19774,10 +19746,7 @@ static MYSQL_SYSVAR_BOOL(alter_copy_bulk, innodb_alter_copy_bulk, const char *page_compression_algorithms[]= { "none", "zlib", "lz4", "lzo", "lzma", "bzip2", "snappy", 0 }; static TYPELIB page_compression_algorithms_typelib= -{ - array_elements(page_compression_algorithms) - 1, 0, - page_compression_algorithms, 0 -}; + CREATE_TYPELIB_FOR(page_compression_algorithms); static MYSQL_SYSVAR_ENUM(compression_algorithm, innodb_compression_algorithm, PLUGIN_VAR_OPCMDARG, "Compression algorithm used on page compression. One of: none, zlib, lz4, lzo, lzma, bzip2, or snappy", @@ -19798,10 +19767,8 @@ static MYSQL_SYSVAR_ULONG(fatal_semaphore_wait_threshold, srv_fatal_semaphore_wa 0); static const char* srv_encrypt_tables_names[] = { "OFF", "ON", "FORCE", 0 }; -static TYPELIB srv_encrypt_tables_typelib = { - array_elements(srv_encrypt_tables_names)-1, 0, srv_encrypt_tables_names, - NULL -}; +static TYPELIB srv_encrypt_tables_typelib = + CREATE_TYPELIB_FOR(srv_encrypt_tables_names); static MYSQL_SYSVAR_ENUM(encrypt_tables, srv_encrypt_tables, PLUGIN_VAR_OPCMDARG, "Enable encryption for tables. " diff --git a/storage/maria/aria_chk.c b/storage/maria/aria_chk.c index 357784c7304..bbabaacbaee 100644 --- a/storage/maria/aria_chk.c +++ b/storage/maria/aria_chk.c @@ -633,9 +633,7 @@ Recover (repair)/ options (When using '--recover' or '--safe-recover'):\n\ const char *maria_stats_method_names[] = {"nulls_unequal", "nulls_equal", "nulls_ignored", NullS}; -TYPELIB maria_stats_method_typelib= { - array_elements(maria_stats_method_names) - 1, "", - maria_stats_method_names, NULL}; +TYPELIB maria_stats_method_typelib= CREATE_TYPELIB_FOR(maria_stats_method_names); /* Read options */ diff --git a/storage/maria/aria_s3_copy.cc b/storage/maria/aria_s3_copy.cc index 606b83cefc9..a4d6a3a62f7 100644 --- a/storage/maria/aria_s3_copy.cc +++ b/storage/maria/aria_s3_copy.cc @@ -32,7 +32,7 @@ #include static const char *op_types[]= {"to_s3", "from_s3", "delete_from_s3", NullS}; -static TYPELIB op_typelib= {array_elements(op_types)-1,"", op_types, NULL}; +static TYPELIB op_typelib= CREATE_TYPELIB_FOR(op_types); #define OP_IMPOSSIBLE array_elements(op_types) static const char *load_default_groups[]= { "aria_s3_copy", 0 }; diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 2b9da88af28..9b925d07e30 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -87,55 +87,35 @@ const char *maria_recover_names[]= */ "NORMAL", "BACKUP", "FORCE", "QUICK", "OFF", NullS }; -TYPELIB maria_recover_typelib= -{ - array_elements(maria_recover_names) - 1, "", - maria_recover_names, NULL -}; +TYPELIB maria_recover_typelib= CREATE_TYPELIB_FOR(maria_recover_names); const char *maria_stats_method_names[]= { "nulls_unequal", "nulls_equal", "nulls_ignored", NullS }; -TYPELIB maria_stats_method_typelib= -{ - array_elements(maria_stats_method_names) - 1, "", - maria_stats_method_names, NULL -}; +TYPELIB maria_stats_method_typelib= CREATE_TYPELIB_FOR(maria_stats_method_names); /* transactions log purge mode */ const char *maria_translog_purge_type_names[]= { "immediate", "external", "at_flush", NullS }; -TYPELIB maria_translog_purge_type_typelib= -{ - array_elements(maria_translog_purge_type_names) - 1, "", - maria_translog_purge_type_names, NULL -}; +TYPELIB maria_translog_purge_type_typelib= CREATE_TYPELIB_FOR(maria_translog_purge_type_names); /* transactional log directory sync */ const char *maria_sync_log_dir_names[]= { "NEVER", "NEWFILE", "ALWAYS", NullS }; -TYPELIB maria_sync_log_dir_typelib= -{ - array_elements(maria_sync_log_dir_names) - 1, "", - maria_sync_log_dir_names, NULL -}; +TYPELIB maria_sync_log_dir_typelib= CREATE_TYPELIB_FOR(maria_sync_log_dir_names); /* transactional log group commit */ const char *maria_group_commit_names[]= { "none", "hard", "soft", NullS }; -TYPELIB maria_group_commit_typelib= -{ - array_elements(maria_group_commit_names) - 1, "", - maria_group_commit_names, NULL -}; +TYPELIB maria_group_commit_typelib= CREATE_TYPELIB_FOR(maria_group_commit_names); /** Interval between background checkpoints in seconds */ static ulong checkpoint_interval; diff --git a/storage/maria/s3_func.c b/storage/maria/s3_func.c index b8918c48d4b..1f743dfa9b2 100644 --- a/storage/maria/s3_func.c +++ b/storage/maria/s3_func.c @@ -40,8 +40,7 @@ static int s3_read_file_from_disk(const char *filename, uchar **to, /* Used by ha_s3.cc and tools to define different protocol options */ static const char *protocol_types[]= {"Auto", "Original", "Amazon", "Legacy", "Path", "Domain", NullS}; -TYPELIB s3_protocol_typelib= {array_elements(protocol_types)-1,"", - protocol_types, NULL}; +TYPELIB s3_protocol_typelib= CREATE_TYPELIB_FOR(protocol_types); static const char *providers[]= {"Default", "Amazon", "Huawei", NullS}; TYPELIB s3_provider_typelib = {array_elements(providers)-1,"",providers, NULL}; diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index 25e34a16cc9..bdf137c40cb 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -656,12 +656,8 @@ static const char *mrn_boolean_mode_sytnax_flag_names[] = { "ALLOW_LEADING_NOT", NullS }; -static TYPELIB mrn_boolean_mode_syntax_flags_typelib = { - array_elements(mrn_boolean_mode_sytnax_flag_names) - 1, - "", - mrn_boolean_mode_sytnax_flag_names, - NULL -}; +static TYPELIB mrn_boolean_mode_syntax_flags_typelib = + CREATE_TYPELIB_FOR(mrn_boolean_mode_sytnax_flag_names); #endif #ifdef MRN_GROONGA_EMBEDDED static mrn_bool mrn_libgroonga_embedded = true; @@ -747,12 +743,8 @@ static const char *mrn_log_level_type_names[] = { "DUMP", NullS }; -static TYPELIB mrn_log_level_typelib = { - array_elements(mrn_log_level_type_names) - 1, - "mrn_log_level_typelib", - mrn_log_level_type_names, - NULL -}; +static TYPELIB mrn_log_level_typelib = + CREATE_TYPELIB_FOR(mrn_log_level_type_names); static void mrn_log_level_update(THD *thd, struct st_mysql_sys_var *var, void *var_ptr, const void *save) @@ -1075,12 +1067,7 @@ static const char *mrn_action_on_error_names[] = { }; static TYPELIB mrn_action_on_error_typelib = -{ - array_elements(mrn_action_on_error_names) - 1, - "mrn_action_on_error_typelib", - mrn_action_on_error_names, - NULL -}; + CREATE_TYPELIB_FOR(mrn_action_on_error_names); static MYSQL_THDVAR_ENUM(action_on_fulltext_query_error, PLUGIN_VAR_RQCMDARG, diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 5e627556e7e..06b2ce26287 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -41,14 +41,12 @@ static ulong opt_myisam_block_size; /* bits in myisam_recover_options */ const char *myisam_recover_names[] = { "DEFAULT", "BACKUP", "FORCE", "QUICK", "BACKUP_ALL", "OFF", NullS}; -TYPELIB myisam_recover_typelib= {array_elements(myisam_recover_names)-1,"", - myisam_recover_names, NULL}; +TYPELIB myisam_recover_typelib= CREATE_TYPELIB_FOR(myisam_recover_names); const char *myisam_stats_method_names[] = {"NULLS_UNEQUAL", "NULLS_EQUAL", "NULLS_IGNORED", NullS}; -TYPELIB myisam_stats_method_typelib= { - array_elements(myisam_stats_method_names) - 1, "", - myisam_stats_method_names, NULL}; +TYPELIB myisam_stats_method_typelib= + CREATE_TYPELIB_FOR(myisam_stats_method_names); static MYSQL_SYSVAR_ULONG(block_size, opt_myisam_block_size, PLUGIN_VAR_READONLY | PLUGIN_VAR_RQCMDARG, diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 98a2ca9d83a..7694d07d661 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -457,9 +457,8 @@ static void usage(void) const char *myisam_stats_method_names[] = {"nulls_unequal", "nulls_equal", "nulls_ignored", NullS}; -TYPELIB myisam_stats_method_typelib= { - array_elements(myisam_stats_method_names) - 1, "", - myisam_stats_method_names, NULL}; +TYPELIB myisam_stats_method_typelib= + CREATE_TYPELIB_FOR(myisam_stats_method_names); /* Read options */ diff --git a/storage/myisammrg/myrg_static.c b/storage/myisammrg/myrg_static.c index 36ec25cb7d9..e140f01e9d4 100644 --- a/storage/myisammrg/myrg_static.c +++ b/storage/myisammrg/myrg_static.c @@ -26,8 +26,7 @@ LIST *myrg_open_list=0; static const char *merge_insert_methods[] = { "FIRST", "LAST", NullS }; -TYPELIB merge_insert_method= { array_elements(merge_insert_methods)-1,"", - merge_insert_methods, 0}; +TYPELIB merge_insert_method= CREATE_TYPELIB_FOR(merge_insert_methods); PSI_memory_key rg_key_memory_MYRG_INFO; PSI_memory_key rg_key_memory_children; diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index ae697574433..b0f587bb0d3 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -768,17 +768,13 @@ static std::shared_ptr rocksdb_rate_limiter; static const char *write_policy_names[] = {"write_committed", "write_prepared", "write_unprepared", NullS}; -static TYPELIB write_policy_typelib = {array_elements(write_policy_names) - 1, - "write_policy_typelib", - write_policy_names, nullptr}; +static TYPELIB write_policy_typelib = CREATE_TYPELIB_FOR(write_policy_names); #if 0 // MARIAROCKS_NOT_YET : read-free replication is not supported /* This array needs to be kept up to date with myrocks::read_free_rpl_type */ static const char *read_free_rpl_names[] = {"OFF", "PK_ONLY", "PK_SK", NullS}; -static TYPELIB read_free_rpl_typelib = {array_elements(read_free_rpl_names) - 1, - "read_free_rpl_typelib", - read_free_rpl_names, nullptr}; +static TYPELIB read_free_rpl_typelib = CREATE_TYPELIB_FOR(read_free_rpl_names); #endif /* This enum needs to be kept up to date with rocksdb::InfoLogLevel */ @@ -786,9 +782,7 @@ static const char *info_log_level_names[] = {"debug_level", "info_level", "warn_level", "error_level", "fatal_level", NullS}; -static TYPELIB info_log_level_typelib = { - array_elements(info_log_level_names) - 1, "info_log_level_typelib", - info_log_level_names, nullptr}; +static TYPELIB info_log_level_typelib = CREATE_TYPELIB_FOR(info_log_level_names); static void rocksdb_set_rocksdb_info_log_level( THD *const thd, struct st_mysql_sys_var *const var, void *const var_ptr, @@ -903,9 +897,7 @@ static int rocksdb_compact_column_family(THD *const thd, static const char *index_type_names[] = {"kBinarySearch", "kHashSearch", NullS}; -static TYPELIB index_type_typelib = {array_elements(index_type_names) - 1, - "index_type_typelib", index_type_names, - nullptr}; +static TYPELIB index_type_typelib = CREATE_TYPELIB_FOR(index_type_names); const ulong RDB_MAX_LOCK_WAIT_SECONDS = 1024 * 1024 * 1024; const ulong RDB_DEFAULT_MAX_ROW_LOCKS = 1024 * 1024;