diff options
author | max99x <max99x@gmail.com> | 2011-06-26 00:24:46 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-06-26 00:24:46 +0300 |
commit | b7cd8aad767e9cb4b0555a60c489966df8dc9405 (patch) | |
tree | 4c4eec0c69e1ad03d83588d96f35d87bcedcdbf3 /src/library.js | |
parent | 37a1ccacaa79addac6094983897d67e0a8630160 (diff) |
Fixed function indexing issues between parent and child;
Child no longer includes library, using the parent's instead.
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index fb114e1e..d2e13273 100644 --- a/src/library.js +++ b/src/library.js @@ -1209,6 +1209,7 @@ var Library = { // void* dlopen(const char* filename, int flag); dlopen__deps: ['$DLFCN_DATA'], dlopen: function(filename, flag) { + // TODO: Add support for LD_LIBRARY_PATH. filename = Pointer_stringify(filename); filename += '.js'; @@ -1227,7 +1228,7 @@ var Library = { } try { - var lib_module = eval(lib_data)(); + var lib_module = eval(lib_data)(FUNCTION_TABLE.length); } catch (e) { DLFCN_DATA.isError = true; return 0; @@ -1287,6 +1288,7 @@ var Library = { } else { var result = lib_module[symbol]; if (typeof result == 'function') { + // TODO: Cache functions rather than appending on every lookup. FUNCTION_TABLE.push(result); FUNCTION_TABLE.push(0); result = FUNCTION_TABLE.length - 2; |