module Bindgen::TypeHelper

Overview

Helper functionality for working with types. Useful for all platforms.

TODO Turn into a struct?

Direct including types

Defined in:

bindgen/type_helper.cr

Instance Method Summary

Instance Method Detail

def passthrough(type : Parser::Type) #

Builds a result passing-through type without modifications.


[View source]
def reconfigure_pass_type(pass_by, is_ref, ptr) #

Helper for #to_X, configuring the type according to user-specified rules.


[View source]
def type_copied?(type) : Bool #

Is type available in Crystal? It will be if any of:

  1. The structure will be copied
  2. It's a built-in type
  3. It's an enumeration type

Otherwise, false is returned. If the type is not configured in the type database, it defaults to false.


[View source]
def type_pointer_depth(type : Parser::Type) : Int32 #

Returns the pointer-depth without a reference of type.


[View source]
def variadic_argument : Call::VariadicArgument #

Builds a Call::VariadicArgument. This is only applicable to directly bound functions.


[View source]