lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

C++ incompatibility following lwan_module member renaming #227

Closed juntalis closed 6 years ago

juntalis commented 6 years ago

Following the 448d47f20cad1dbe14d66842980e5e82d04153d7 commit, it's no longer possibly to include lwan.h from a C++ source file without modifications: the lwan_module.new field is getting interpreted as the new keyword, resulting in compilation errors.

/usr/local/include/lwan/lwan.h:328:13: error: expected unqualified-id before ‘new’
     void *(*new)(const char *prefix, void *args);
             ^
/usr/local/include/lwan/lwan.h:328:13: error: expected ‘)’ before ‘new’
/usr/local/include/lwan/lwan.h:328:12: error: expected ‘;’ at end of member declaration
     void *(*new)(const char *prefix, void *args);
            ^
/usr/local/include/lwan/lwan.h:328:13: error: expected unqualified-id before ‘new’
     void *(*new)(const char *prefix, void *args);
lpereira commented 6 years ago

Fixed. Thanks for reporting