Skip to content

Commit 2648de7

Browse files
committed
descriptor: rename canonicalize to canonicalize_impl
canonicalize() is exposed as a math function when _GNU_SOURCE is defined. Since some amalgamation users might need that, rename it.
1 parent 2d0e6fe commit 2648de7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/descriptor.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,9 @@ static bool is_identifer_char(char c)
375375
static bool is_policy_start_char(char c) { return c == '@'; }
376376
static bool is_policy_identifer_char(char c) { return c >= '0' && c <= '9'; }
377377

378-
static int canonicalize(const char *descriptor,
379-
const struct wally_map *vars_in, uint32_t flags,
380-
char **output, size_t *num_substitutions)
378+
static int canonicalize_impl(const char *descriptor,
379+
const struct wally_map *vars_in, uint32_t flags,
380+
char **output, size_t *num_substitutions)
381381
{
382382
const size_t VAR_MAX_NAME_LEN = 16;
383383
is_identifer_fn is_id_start = is_identifer_char, is_id_char = is_identifer_char;
@@ -2754,8 +2754,8 @@ int wally_descriptor_parse(const char *miniscript,
27542754
ctx->num_multipaths = 1;
27552755
ret = wally_map_init(vars_in ? vars_in->num_items : 1, NULL, &ctx->keys);
27562756
if (ret == WALLY_OK)
2757-
ret = canonicalize(miniscript, vars_in, flags & MS_FLAGS_CANONICALIZE,
2758-
&ctx->src, &num_substitutions);
2757+
ret = canonicalize_impl(miniscript, vars_in, flags & MS_FLAGS_CANONICALIZE,
2758+
&ctx->src, &num_substitutions);
27592759
if (ret == WALLY_OK) {
27602760
ctx->src_len = strlen(ctx->src);
27612761
ctx->features = WALLY_MS_IS_DESCRIPTOR; /* Un-set if miniscript found */

0 commit comments

Comments
 (0)