Skip to content

src: namespace symbols clashing with lib #14785

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

Closed
wants to merge 1 commit into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Sep 4, 2024

lib/http.h and src/tool_sdecls.h both declared HTTPREQ_*
enums.

Rename src ones to have distinct names.

They are not included in the same code for now, but this may
change when bundling unit/libtests into single programs. But I
figure it'd be nice to make these unique regardless.


Question: Would it be better to merge them and move them to
curl_setup.h or someplace shared between lib and src?

curl/lib/http.h

Lines 36 to 43 in 6a9b710

typedef enum {
HTTPREQ_GET,
HTTPREQ_POST,
HTTPREQ_POST_FORM, /* we make a difference internally */
HTTPREQ_POST_MIME, /* we make a difference internally */
HTTPREQ_PUT,
HTTPREQ_HEAD
} Curl_HttpReq;

curl/src/tool_sdecls.h

Lines 116 to 123 in 6a9b710

typedef enum {
HTTPREQ_UNSPEC, /* first in list */
HTTPREQ_GET,
HTTPREQ_HEAD,
HTTPREQ_MIMEPOST,
HTTPREQ_SIMPLEPOST,
HTTPREQ_PUT
} HttpReq;

lib/http.h and src/tool_sdecls.h both declared `HTTPREQ_*` enums.
These were used in the same source till now. They do now when
building bundling up unit tests into a single source file.
@vszakats vszakats closed this in 32eee8f Sep 4, 2024
@vszakats vszakats deleted the src-lib-enum-clash branch September 4, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants