aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-01 16:20:27 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-01 16:20:27 -0700
commit3cff82da6afdc1b377f081d84b463581624f5e02 (patch)
treeb13ed1619e549e37eac877fba33fe5ec810cdae0 /src/library.js
parent19d109d8eff8fe5a153d5b8536f3cbee7ac10557 (diff)
parentad2bd9af8354849c88254dc01f20fd96549a796f (diff)
Merge branch 'qsort_reduce_callchain' of github.com:PinZhang/emscripten into incoming
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js
index 68addfdc..8342decf 100644
--- a/src/library.js
+++ b/src/library.js
@@ -4157,7 +4157,11 @@ LibraryManager.library = {
var keys = [];
for (var i = 0; i < num; i++) keys.push(i);
keys.sort(function(a, b) {
- return comparator(base+a*size, base+b*size);
+#if ASM_JS
+ return Module['dynCall_iii'](cmp, base+a*size, base+b*size);
+#else
+ return FUNCTION_TABLE[cmp](base+a*size, base+b*size);
+#endif
});
// apply the sort
var temp = _malloc(num*size);