Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

rename XX macro in http_parser.h #487

Open
freedaun opened this issue Jul 16, 2019 · 3 comments
Open

rename XX macro in http_parser.h #487

freedaun opened this issue Jul 16, 2019 · 3 comments

Comments

@freedaun
Copy link

Problem Description

I got a conflict with http_parser.h, which uses the same macro name:

#define XX()

Code to reproduce this issue

#define XX(x) something

Proposed solution

Never use non-descript unqualified macro-names in libs, as these identifier belong to the user and end up breaking their code. So either qualify the define and rename it HTTP_PARSER_XX(), or use the standard X-macro name convention ENTRY().

@freedaun
Copy link
Author

I might add that I'm using this code downstream, in the Espressif ESP32. That's probably why this occurs.

@bnoordhuis
Copy link
Member

This is about the http_status and http_method enums? I'm fine with changing those to something HTTP_PARSER_ qualified. Want to submit a PR?

@freedaun
Copy link
Author

freedaun commented Jul 16, 2019

This is about the http_status and http_method enums?

yes.

Want to submit a PR?

No.. apparently a replace on XX to HTTP_PARSER_XX works.

thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants