code: function createWrapperPointer (func, type) {
    var argTypes = type.args || type[1] || [];
    var rtnType = type.retval || type[0] || 'v';
  
    if (func.pointer) return func.pointer;
    return new ffi.Callback(types.map(rtnType), types.mapArray(argTypes), function() {
      return unwrapValue(func.apply(null, wrapValues(arguments, argTypes)), rtnType);
    });
  }
docs: Represents a wrapped `IMP` (a.k.a. method implementation). `IMP`s are function pointers for methods. The first two arguments are always:
  
  1. `self` - The object instance the method is being called on.
  2. `_cmd` - The `SEL` selector of the method being invoked.
  
  Any additional arguments that get passed are the actual arguments that get
  passed along to the method.
   
  Creates an ffi Function Pointer to the passed in 'func' Function. The
  function gets wrapped in an "wrapper" function, which wraps the passed in
  arguments, and unwraps the return value.
  
  @param {Function} A JS function to be converted to an ffi C function.
  @param {Object|Array} A "type" object or Array containing the 'retval' and
  'args' for the Function.
  @api private