diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-27 20:12:46 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-27 20:12:46 -0800 |
commit | 87758abf9f56473b5da6945a5d7e020e2ead1bd5 (patch) | |
tree | ca665cc9ffac156b8eb46b7bc0b2b80bc82d600c /system/include | |
parent | dd8ef8c71cb8b1429c86ce95ffaced67daab2c96 (diff) |
EM_ASM_ variants that return a value but receive no inputs; fixes #2070
Diffstat (limited to 'system/include')
-rw-r--r-- | system/include/emscripten/emscripten.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index fb456d67..2fc82f50 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -50,10 +50,14 @@ extern "C" { * return $0 + $1; * }, calc(), otherCalc()); * - * Note the {,} + * Note the { and }. If you just want to receive an output value + * (int or double) but *not* to pass any values, you can use + * EM_ASM_INT_V and EM_ASM_DOUBLE_V respectively. */ #define EM_ASM_INT(code, ...) emscripten_asm_const_int(#code, __VA_ARGS__) #define EM_ASM_DOUBLE(code, ...) emscripten_asm_const_double(#code, __VA_ARGS__) +#define EM_ASM_INT_V(code) emscripten_asm_const_int(#code) +#define EM_ASM_DOUBLE_V(code) emscripten_asm_const_double(#code) /* * Forces LLVM to not dead-code-eliminate a function. Note that |