class

Bindgen::Processor::ExternC

Inherits Bindgen::Processor::Base < Bindgen::Graph::Visitor < Reference < Object

Checks if a method require a C/C++ wrapper. If not, marks the method to bind directly to the target method instead of writing a "trampoline" wrapper in C++.

A method can be bound directly if all of these are true:

  1. It uses the C ABI (extern "C")
  2. No argument uses a to_cpp converter
  3. The return type doesn't use a from_cpp converter

Additionally, these rules must be met:

  1. No calls for CrystalBinding nor Cpp are set
  2. Graph::Method::EXPLICIT_BIND_TAG is not already set

If any of this is false, the method is left alone.

Constants

Log = ::Log.for(self)

Checks if a method require a C/C++ wrapper. If not, marks the method to bind directly to the target method instead of writing a "trampoline" wrapper in C++.

A method can be bound directly if all of these are true:

  1. It uses the C ABI (extern "C")
  2. No argument uses a to_cpp converter
  3. The return type doesn't use a from_cpp converter

Additionally, these rules must be met:

  1. No calls for CrystalBinding nor Cpp are set
  2. Graph::Method::EXPLICIT_BIND_TAG is not already set

If any of this is false, the method is left alone.

PLATFORM = Graph::Platform::Crystal

Instance methods

visit_method(method)

Visits a Graph::Method.

Source
visit_platform_specific(specific)

Visits a Graph::PlatformSpecific.

Source