Permalink
Browse files

allow indirect opaques

  • Loading branch information...
1 parent 0057810 commit 8991141d24779387267c073f8e8c9dc78d10e8e7 @tjfontaine committed Oct 7, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/generateffi.js
View
6 lib/generateffi.js
@@ -104,6 +104,9 @@ exports.generate = function (opts) {
ret += 'var ' + name;
ret += ' = exports.' + name;
ret += ' = StrictType(voidPtr);';
+ ret += 'var ' + name + 'Ptr';
+ ret += ' = exports.' + name + 'Ptr';
+ ret += ' = StrictType(ref.refType(' + name + '));';
return ret;
};
this.toString = function () {
@@ -332,8 +335,7 @@ exports.generate = function (opts) {
ret = new WrapType('voidPtr');
}
} else {
- if (!ret.opaque)
- ret = new WrapType(ret.name + 'Ptr');
+ ret = new WrapType(ret.name + 'Ptr');
}
break;
case Type.ConstantArray:

0 comments on commit 8991141

Please sign in to comment.