aboutsummaryrefslogtreecommitdiff
path: root/src/include/emscripten.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2011-02-12 19:35:45 -0800
committerAlon Zakai <azakai@mozilla.com>2011-02-12 19:35:45 -0800
commitffb61d77cae700fe2f45c60e06715033ae9f653a (patch)
tree1ff4e3c091603dd2a38a9029976a586234a41dfd /src/include/emscripten.h
parent96b74d5914bb6495f4e82cac12ce25c7aedf77a1 (diff)
emscripten_run_script API
Diffstat (limited to 'src/include/emscripten.h')
-rw-r--r--src/include/emscripten.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/emscripten.h b/src/include/emscripten.h
index 1974fc71..958bef98 100644
--- a/src/include/emscripten.h
+++ b/src/include/emscripten.h
@@ -9,6 +9,10 @@
// ES_SIZEOF
//
+// NOTE: As of now, ES_SIZEOF is not needed when using QUANTUM_SIZE
+// of 4. We will use the same offsets as C/C++ does in that case.
+// ES_SIZEOF is useful if QUANTUM_SIZE is 1.
+//
// A 'safe' sizeof operator. Sadly llvm-gcc calculates sizeof's
// and stores them hardcoded as raw values, unlike say offsets
// within a structure which it nicely details using getelementptr.
@@ -40,3 +44,7 @@
#define ES_SIZEOF(T) sizeof(T)
#endif
+// Interface to the underlying JS engine. This function will
+// eval() the given script.
+extern void emscripten_run_script(const char *script);
+