diff options
author | Chad Austin <chad@imvu.com> | 2013-05-17 11:24:57 -0700 |
---|---|---|
committer | Chad Austin <chad@imvu.com> | 2013-05-17 13:01:25 -0700 |
commit | d4378fb11958d50eea52cc6d9ee995cf57f8fa0d (patch) | |
tree | 343744b6501f543156c9785708438acc0cbe2b38 /src/library.js | |
parent | a7c47e66eed5c2db9aac373f9b0d043d9f048703 (diff) |
Prevent leak detection from tripping on __setErrNo
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js index 344ec8d6..2efb7a6f 100644 --- a/src/library.js +++ b/src/library.js @@ -6794,10 +6794,12 @@ LibraryManager.library = { 26: 'Text file busy', 18: 'Invalid cross-device link' }, + __errno_state: 0, + __setErrNo__deps: ['__errno_state'], + __setErrNo__postset: '___errno_state = Runtime.staticAlloc(4);', __setErrNo: function(value) { // For convenient setting and returning of errno. - if (!___setErrNo.ret) ___setErrNo.ret = allocate([0], 'i32', ALLOC_NORMAL); - {{{ makeSetValue('___setErrNo.ret', '0', 'value', 'i32') }}} + {{{ makeSetValue('___errno_state', '0', 'value', 'i32') }}} return value; }, __errno_location__deps: ['__setErrNo'], |