aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormax99x <max99x@gmail.com>2011-08-23 16:52:09 +0300
committermax99x <max99x@gmail.com>2011-08-23 16:52:09 +0300
commit238ca947686672f4eec0339617e0e7aaf7fcc407 (patch)
treed567d59e53716f82ee46d412486fd7a07ffbeb10
parent1e84d2e65a9044f02b06644edc33a3b49f3c8b25 (diff)
Made sure all preamble functions are exported.
-rw-r--r--src/preamble.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 2cbd9cf0..64b3e222 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -398,6 +398,7 @@ function Pointer_stringify(ptr) {
}
return ret;
}
+Module['Pointer_stringify'] = Pointer_stringify;
function Array_stringify(array) {
var ret = "";
@@ -406,6 +407,7 @@ function Array_stringify(array) {
}
return ret;
}
+Module['Array_stringify'] = Array_stringify;
// Memory management
@@ -537,12 +539,14 @@ function Array_copy(ptr, num) {
#endif
return HEAP.slice(ptr, ptr+num);
}
+Module['Array_copy'] = Array_copy;
function String_len(ptr) {
var i = 0;
while ({{{ makeGetValue('ptr', 'i', 'i8') }}}) i++; // Note: should be |!= 0|, technically. But this helps catch bugs with undefineds
return i;
}
+Module['String_len'] = String_len;
// Copies a C-style string, terminated by a zero, from the HEAP into
// a normal JavaScript array of numbers
@@ -553,6 +557,7 @@ function String_copy(ptr, addZero) {
if (addZero) ret[len-1] = 0;
return ret;
}
+Module['String_copy'] = String_copy;
// Tools
@@ -598,6 +603,7 @@ function intArrayToString(array) {
}
return ret.join('');
}
+Module['intArrayToString'] = intArrayToString;
{{{ unSign }}}
{{{ reSign }}}