summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library.js9
-rwxr-xr-xtests/runner.py4
2 files changed, 11 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js
index 1dcc57ad..4d7b397e 100644
--- a/src/library.js
+++ b/src/library.js
@@ -6758,6 +6758,15 @@ LibraryManager.library = {
_pthread_key_create.keys[key] = value;
},
+ pthread_key_delete: ['$ERRNO_CODES'],
+ pthread_key_delete: function(key) {
+ if (_pthread_key_create.keys[key]) {
+ delete _pthread_key_create.keys[key];
+ return 0;
+ }
+ return ERRNO_CODES.EINVAL;
+ },
+
pthread_cleanup_push: function(routine, arg) {
__ATEXIT__.push({ func: function() { Runtime.dynCall('vi', routine, [arg]) } })
_pthread_cleanup_push.level = __ATEXIT__.length;
diff --git a/tests/runner.py b/tests/runner.py
index cc6f8b1d..1d0fc07f 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -8664,7 +8664,7 @@ f.close()
# Run through node, if CMake produced a .js file.
if cmake_outputs[i].endswith('.js'):
- ret = Popen([NODE_JS, tempdirname + '/' + cmake_outputs[i]], stdout=PIPE).communicate()[0]
+ ret = Popen(listify(NODE_JS) + [tempdirname + '/' + cmake_outputs[i]], stdout=PIPE).communicate()[0]
assert 'hello, world!' in ret, 'Running cmake-based .js application failed!'
finally:
os.chdir(path_from_root('tests')) # Move away from the directory we are about to remove.
@@ -9471,7 +9471,7 @@ f.close()
(path_from_root('tools', 'test-js-optimizer-asm-last.js'), open(path_from_root('tools', 'test-js-optimizer-asm-last-output.js')).read(),
['asm', 'last']),
]:
- output = Popen([NODE_JS, path_from_root('tools', 'js-optimizer.js'), input] + passes, stdin=PIPE, stdout=PIPE).communicate()[0]
+ output = Popen(listify(NODE_JS) + [path_from_root('tools', 'js-optimizer.js'), input] + passes, stdin=PIPE, stdout=PIPE).communicate()[0]
self.assertIdentical(expected, output.replace('\r\n', '\n').replace('\n\n', '\n'))
def test_m_mm(self):