-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
While there, allow "proxy_wasm_externs.h" externs to be exported as either C (for Wasm) or C++ (for NullVM). Signed-off-by: Piotr Sikora <[email protected]>
- Loading branch information
1 parent
f094746
commit 9af5ac0
Showing
4 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,9 @@ cc_library( | |
"proxy_wasm_api.h", | ||
"proxy_wasm_externs.h", | ||
], | ||
deps = [ | ||
":common_lib", | ||
], | ||
) | ||
|
||
cc_library( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9af5ac0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch looks like a reasonable addition but it introduced a problem that is hard to fix now - as far as most headers here pollute the global/current namespace with the symbols adding
cstdint
to these 2 files pollutes the current namespace withnamespace std {}
. When these files (ieproxy_wasm_enums.h
) are included in a non-global namespace (namespace A { #include "proxy_wasm_common.h" }
) in descendant projects that do want to avoid polluting global namespace the current namespace appears to be polluted with a subset ofstd{}
that duplicates definitions from::std
and prevents proper name resolution for missing symbols likestd::string
in the namespace, like in: