Created
February 27, 2013 01:03
-
-
Save vvuk/5043972 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/library.js b/src/library.js | |
index d0f73fd..955755e 100644 | |
--- a/src/library.js | |
+++ b/src/library.js | |
@@ -6743,11 +6743,12 @@ LibraryManager.library = { | |
pthread_key_create: function(key, destructor) { | |
if (!_pthread_key_create.keys) _pthread_key_create.keys = {}; | |
- _pthread_key_create.keys[key] = null; | |
+ // values start at 0 | |
+ _pthread_key_create.keys[key] = 0; | |
}, | |
pthread_getspecific: function(key) { | |
- return _pthread_key_create.keys[key]; | |
+ return _pthread_key_create.keys[key] || 0; | |
}, | |
pthread_setspecific: function(key, value) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment