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 wrong declaration of jv_string_value #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FantasqueX
Copy link

Currently, there is a warning when building wheel.

jq.c: In function ‘__pyx_f_2jq_jv_string_to_py_string’:
jq.c:12111:24: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
12111 |   __pyx_v_string_value = jv_string_value(__pyx_v_value);
      |

This is because the type of return value of jv_string_value is const char * instead of char *. This is not an API change. The function returns const char * when it becomes available.

Currently, there is a warning when building wheel.
```
jq.c: In function ‘__pyx_f_2jq_jv_string_to_py_string’:
jq.c:12111:24: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
12111 |   __pyx_v_string_value = jv_string_value(__pyx_v_value);
      |
```

This is because the type of return value of `jv_string_value` is `const
char *` instead of `char *`. This is not an API change. The function
returns `const char *` when it becomes available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant