class FFI::Struct

def callback(params, ret)

def callback(params, ret)
  mod = enclosing_module
  ret_type = find_type(ret, mod)
  if ret_type == Type::STRING
    raise TypeError, ":string is not allowed as return type of callbacks"
  end
  FFI::CallbackInfo.new(ret_type, params.map { |e| find_type(e, mod) })
end