Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/user-config.h

Issue 29613616: Issue 6064 - Put C++ code into a configurable namespace (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: rebase Created Dec. 12, 2017, 12:45 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/traceInit.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/user-config.h
diff --git a/compiled/bindings/runtime.h b/compiled/user-config.h
similarity index 57%
copy from compiled/bindings/runtime.h
copy to compiled/user-config.h
index 549eeef479e5ace136c078f942008c21b98f1734..4bbf3323438da8af8baad582d1a66dfebac54140 100644
--- a/compiled/bindings/runtime.h
+++ b/compiled/user-config.h
@@ -12,14 +12,23 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
-#if defined(__EMSCRIPTEN__)
-#include <emscripten.h>
-#define BINDINGS_EXPORTED EMSCRIPTEN_KEEPALIVE
+// ABP_NS, ABP_NS_BEGIN, ABP_NS_END and ABP_NS_USING allow to put the code of
+// this library into ABP_NS namespace. The easiest way to do it is to define
+// ABP_NS on the next line.
+//#define ABP_NS abp_core
+#if defined(ABP_NS)
+#define ABP_NS_BEGIN namespace ABP_NS {
+#define ABP_NS_END }
+#define ABP_NS_USING using namespace ABP_NS;
#else
-#define BINDINGS_EXPORTED
+#define ABP_NS
+#define ABP_NS_BEGIN
+#define ABP_NS_END
+#define ABP_NS_USING
#endif
+
« no previous file with comments | « compiled/traceInit.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld