diff options
author | Chad Austin <chad@imvu.com> | 2013-03-07 15:32:47 -0800 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:25:09 +0300 |
commit | 612340cec2f3761efffc450e1de0adb445a45036 (patch) | |
tree | 2b23638f1dd708c51a0a742ddb50b082a10d2ef5 /src | |
parent | b4b75b51bf0e8c72aa8514eaf708b1d1aae30a8e (diff) |
oh hey, you can use .push with multiple arguments
Conflicts:
src/embind/embind.js
Diffstat (limited to 'src')
-rwxr-xr-x | src/embind/embind.js | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index 19c24812..5d6e6c21 100755 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -233,8 +233,7 @@ function __embind_register_cstring(rawType, name) { for (var i = 0; i < length; ++i) { HEAPU8[ptr + 4 + i] = value.charCodeAt(i); } - destructors.push(_free); - destructors.push(ptr); + destructors.push(_free, ptr); return ptr; }, }); @@ -324,8 +323,7 @@ function __embind_register_tuple(rawType, name, rawConstructor, rawDestructor) { for (var i = 0; i < len; ++i) { this.elements[i].write(ptr, o[i]); } - destructors.push(rawDestructor); - destructors.push(ptr); + destructors.push(rawDestructor, ptr); return ptr; }, }); @@ -438,8 +436,7 @@ function __embind_register_struct( for (fieldName in fields) { fields[fieldName].write(ptr, o[fieldName]); } - destructors.push(rawDestructor); - destructors.push(ptr); + destructors.push(rawDestructor, ptr); return ptr; }, }); @@ -520,8 +517,7 @@ RegisteredPointer.prototype.toWireType = function(destructors, handle) { ptr = this.rawConstructor( ptr, handle.$$.smartPtr); - destructors.push(this.rawDestructor); - destructors.push(ptr); + destructors.push(this.rawDestructor, ptr); } return ptr; }; @@ -1042,8 +1038,7 @@ function __embind_register_interface( toWireType: function(destructors, o) { var handle = __emval_register(o); var ptr = this.rawConstructor(handle); - destructors.push(this.rawDestructor); - destructors.push(ptr); + destructors.push(this.rawDestructor, ptr); return ptr; }, }); |