-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
keyword conflict with zebos list_creat(), list_free() #11190
Conversation
Hi @ityuhui Can you check this PR? |
Thank you @minerba After you changed the function name, you need change all the places where these functions are called, or the build will fail. e.g. openapi-generator/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache Line 77 in 5fc1611
The definition of the functions should be changed too openapi-generator/modules/openapi-generator/src/main/resources/C-libcurl/list.c.mustache Line 26 in 5fc1611
And you need execute ./bin/generate-samples.sh bin/configs/c.yaml to generate the sample to verify |
cc @zhemant |
What does I'm just thinking if there's a better prefix. |
Yes @wing328 Could you have a suggestion ? |
We can use project name tag which is fetched from the yaml files. This increases the length of function names but considering the API designer give proper names we shouldn't face issue of functions repeated declaration. This can be achieved by making some changes in the clulibcurlclient java file. |
Here are how other functions are named in that file:
so I would suggest the following to conform to the convention oag_list_create => list_createList What do you guys think? |
Looks good to me now 👍 |
@@ -530,7 +530,7 @@ void apiClient_invoke(apiClient_t *apiClient, | |||
|
|||
res = curl_easy_perform(handle); | |||
|
|||
curl_slist_free_all(headers); | |||
curl_slist_freeList_all(headers); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think curl_slist_free_all
should be modified because it is a function of libcurl https://curl.se/libcurl/c/curl_slist_free_all.html
@minerba
please create a new PR to rollback these changes for curl_slist_free_all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ityuhui
Ok I will create a new PR soon.
Rollback |
Key work "list_create()" and "list_free()" Conflict with Zebos "llist_create()" and "list_free()"
kubernetes-client/c#90 (comment)
change to
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(5.3.0),6.0.x