Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: avoid bool for function name for C23 #134

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/cql2ccl.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static void pr_term(const char **cpp, int stop_at_space,
*cpp = cp;
}

static int node(struct cql_node *cn,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have you renamed this function as well as bool?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because if bool is renamed to node_bool (I think this name is not-bad choice), I think the original node function should be renamed similarly.
(New function have node_ prefix, so leaving original node function name is too confusing in my opinion.)

If you have better idea how to rename bool function, I can let you do so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.

static int node_st(struct cql_node *cn,
void (*pr)(const char *buf, void *client_data),
void *client_data)
{
Expand Down Expand Up @@ -159,7 +159,7 @@ static int node(struct cql_node *cn,
}


static int bool(struct cql_node *cn,
static int node_bool(struct cql_node *cn,
void (*pr)(const char *buf, void *client_data),
void *client_data)
{
Expand Down Expand Up @@ -237,9 +237,9 @@ static int cql_to_ccl_r(struct cql_node *cn,
switch (cn->which)
{
case CQL_NODE_ST:
return node(cn, pr, client_data);
return node_st(cn, pr, client_data);
case CQL_NODE_BOOL:
return bool(cn, pr, client_data);
return node_bool(cn, pr, client_data);
case CQL_NODE_SORT:
return cql_to_ccl_r(cn->u.sort.search, pr, client_data);
}
Expand Down
Loading