[api] Node was complaining about non-trivial designated initializers (probably the bit fields), so converting to old-school initializer

This commit is contained in:
Al
2015-12-19 02:34:31 -05:00
parent 97906c86a8
commit 48cb2b5c7b

View File

@@ -36,8 +36,8 @@ Address dictionaries
typedef struct normalize_options { typedef struct normalize_options {
// List of language codes // List of language codes
int num_languages;
char **languages; char **languages;
int num_languages;
uint16_t address_components; uint16_t address_components;
// String options // String options
@@ -63,26 +63,26 @@ typedef struct normalize_options {
} normalize_options_t; } normalize_options_t;
static normalize_options_t LIBPOSTAL_DEFAULT_OPTIONS = { static normalize_options_t LIBPOSTAL_DEFAULT_OPTIONS = {
.num_languages = 1, NULL, // languages
.languages = NULL, 0, // num_languages
.address_components = ADDRESS_NAME | ADDRESS_HOUSE_NUMBER | ADDRESS_STREET | ADDRESS_UNIT, ADDRESS_NAME | ADDRESS_HOUSE_NUMBER | ADDRESS_STREET | ADDRESS_UNIT, // address_components
.latin_ascii = 1, 1, // latin_ascii
.transliterate = 1, 1, // transliterate
.strip_accents = 1, 1, // strip_accents
.decompose = 1, 1, // decompose
.lowercase = 1, 1, // lowercase
.trim_string = 1, 1, // trim_string
.replace_word_hyphens = 1, 1, // replace_word_hyphens
.delete_word_hyphens = 1, 1, // delete_word_hyphens
.replace_numeric_hyphens = 0, 0, // replace_numeric_hyphens
.delete_numeric_hyphens = 0, 0, // delete_numeric_hyphens
.split_alpha_from_numeric = 1, 1, // split_alpha_from_numeric
.delete_final_periods = 1, 1, // delete_final_periods
.delete_acronym_periods = 1, 1, // delete_acronym_periods
.drop_english_possessives = 1, 1, // drop_english_possessives
.delete_apostrophes = 1, 1, // delete_apostrophes
.expand_numex = 1, 1, // expand_numex
.roman_numerals = 1 1 // roman_numerals
}; };
char **expand_address(char *input, normalize_options_t options, size_t *n); char **expand_address(char *input, normalize_options_t options, size_t *n);
@@ -103,8 +103,8 @@ typedef struct address_parser_options {
} address_parser_options_t; } address_parser_options_t;
static address_parser_options_t LIBPOSTAL_ADDRESS_PARSER_DEFAULT_OPTIONS = { static address_parser_options_t LIBPOSTAL_ADDRESS_PARSER_DEFAULT_OPTIONS = {
.language = NULL, NULL, // language
.country = NULL NULL // country
}; };
void address_parser_response_destroy(address_parser_response_t *self); void address_parser_response_destroy(address_parser_response_t *self);