| Index: compiled/debug.h |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/compiled/debug.h |
| @@ -0,0 +1,28 @@ |
| +#ifndef ADBLOCK_PLUS_DEBUG_H |
| +#define ADBLOCK_PLUS_DEBUG_H |
| + |
| +#include <string> |
| + |
| +#include <emscripten.h> |
| + |
| +struct console_type |
| +{ |
| + static void log(const std::u16string& str) |
| + { |
| + EM_ASM_ARGS(console.log(getStringData($0)), &str); |
| + } |
| + |
| + static void log(int i) |
| + { |
| + EM_ASM_ARGS(console.log($0), i); |
| + } |
| + |
| + static void log(void* ptr) |
| + { |
| + EM_ASM_ARGS(console.log($0), ptr); |
| + } |
| +}; |
| + |
| +static console_type console; |
| + |
| +#endif |