mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
scanner: move include directives before extern "C" wrapper
Adding extern "C" wrapper before includes (especially system ones) is illadvised as the headers themselves can behave diffently in that case. See the section "Including C Headers in C++ Code" in the following http://www.oracle.com/technetwork/articles/servers-storage-dev/mixingcandcpluspluscode-305840.html Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
ae78dcb1ad
commit
05f7aec1d5
1 changed files with 3 additions and 3 deletions
|
|
@ -1423,13 +1423,13 @@ emit_header(struct protocol *protocol, enum side side)
|
|||
printf("#ifndef %s_%s_PROTOCOL_H\n"
|
||||
"#define %s_%s_PROTOCOL_H\n"
|
||||
"\n"
|
||||
"#include <stdint.h>\n"
|
||||
"#include <stddef.h>\n"
|
||||
"#include \"%s\"\n\n"
|
||||
"#ifdef __cplusplus\n"
|
||||
"extern \"C\" {\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
"#include <stdint.h>\n"
|
||||
"#include <stddef.h>\n"
|
||||
"#include \"%s\"\n\n"
|
||||
"struct wl_client;\n"
|
||||
"struct wl_resource;\n\n",
|
||||
protocol->uppercase_name, s,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue