Skip to content

Commit

Permalink
regex-morph.c: Add alloc_key() under #if HAVE_THREADS_H
Browse files Browse the repository at this point in the history
  • Loading branch information
ampli committed Apr 23, 2024
1 parent 4102946 commit c7bb48c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion link-grammar/dict-common/regex-morph.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ static void reg_free(Regex_node *rn)
#if HAVE_THREADS_H && !__EMSCRIPTEN__
static once_flag call_once_flag = ONCE_FLAG_INIT;
static tss_t re_md_key;
#endif // HAVE_THREADS_H && !__EMSCRIPTEN__

static void alloc_key(void)
{
int rc = tss_create(&re_md_key, (tss_dtor_t) pcre2_match_data_free);
if (thrd_success == rc) return;
prt_error("Error: pcre2 alloc per-thread key failed\n");
}
#endif // HAVE_THREADS_H && !__EMSCRIPTEN__

static pcre2_match_data* alloc_match_data(void)
{
Expand Down

0 comments on commit c7bb48c

Please sign in to comment.