From 7ad6a90ea2e75388d42b5b223d9273119994037e Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 10 Apr 2016 01:11:09 -0700 Subject: Change parser_token_types from wcstring to const wchar_t * Reduces allocations and startup time --- src/parse_constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parse_constants.h') diff --git a/src/parse_constants.h b/src/parse_constants.h index afc88c6c..03dffd28 100644 --- a/src/parse_constants.h +++ b/src/parse_constants.h @@ -83,7 +83,7 @@ enum parse_token_type_t LAST_PARSE_TOKEN_TYPE = parse_token_type_end } __packed; // Array of strings corresponding to the enums above instantiated in parse_tree.cpp. -extern wcstring parser_token_types[]; +extern const wchar_t * const parser_token_types[]; /* These must be maintained in sorted order (except for none, which isn't a keyword). This enables us to do binary search. */ enum parse_keyword_t -- cgit v1.2.3