http-parser
http-parser copied to clipboard
rename XX macro in http_parser.h
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().
I might add that I'm using this code downstream, in the Espressif ESP32. That's probably why this occurs.
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?
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.