class Bindgen::Processor::ExternC
- Bindgen::Processor::ExternC
 - Bindgen::Processor::Base
 - Reference
 - Object
 
Overview
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:
- It uses the C ABI (
extern "C") - No argument uses a 
to_cppconverter - The return type doesn't use a 
from_cppconverter 
Additionally, these rules must be met:
- No calls for 
CrystalBindingnorCppare set Graph::Method::EXPLICIT_BIND_TAGis not already set
If any of this is false, the method is left alone.
Defined in:
bindgen/processor/extern_c.crConstant Summary
- 
        PLATFORM = 
Graph::Platform::Crystal 
Class Method Summary
- 
        .logger
        
          
Checks if a method require a C/C++ wrapper.
 
Instance Method Summary
- 
        #logger
        
          
Checks if a method require a C/C++ wrapper.
 - 
        #visit_method(method)
        
          
Visits a
Graph::Method. - 
        #visit_platform_specific(specific)
        
          
Visits a
Graph::PlatformSpecific. 
Instance methods inherited from class Bindgen::Processor::Base
  
  
    
      process(graph : Graph::Container, doc : Parser::Document)
    process
    
  
    
  Constructor methods inherited from class Bindgen::Processor::Base
  
  
    
      new(config : Configuration, db : TypeDatabase)
    new
    
  
    
  
    
  Instance methods inherited from module Bindgen::Graph::Visitor
  
  
    
      visit_alias(alias_name)
    visit_alias, 
    
  
    
      visit_children(container : Container)
    visit_children, 
    
  
    
      visit_class(klass)
    visit_class, 
    
  
    
      visit_constant(constant)
    visit_constant, 
    
  
    
      visit_enum(enumeration)
    visit_enum, 
    
  
    
      visit_library(library)
    visit_library, 
    
  
    
      visit_method(method)
    visit_method, 
    
  
    
      visit_namespace(ns)
    visit_namespace, 
    
  
    
      visit_node(node : Node)
    visit_node, 
    
  
    
      visit_node?(node : Node)
    visit_node?, 
    
  
    
      visit_platform_specific(specific)
    visit_platform_specific, 
    
  
    
      visit_struct(structure)
    visit_struct, 
    
  
    
      visit_union(structure)
    visit_union
    
  
    
    
  
    
    
    
  
    
    
    
  
Class Method Detail
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:
- It uses the C ABI (
extern "C") - No argument uses a 
to_cppconverter - The return type doesn't use a 
from_cppconverter 
Additionally, these rules must be met:
- No calls for 
CrystalBindingnorCppare set Graph::Method::EXPLICIT_BIND_TAGis not already set
If any of this is false, the method is left alone.
Instance Method Detail
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:
- It uses the C ABI (
extern "C") - No argument uses a 
to_cppconverter - The return type doesn't use a 
from_cppconverter 
Additionally, these rules must be met:
- No calls for 
CrystalBindingnorCppare set Graph::Method::EXPLICIT_BIND_TAGis not already set
If any of this is false, the method is left alone.
Visits a Graph::Method.
Visits a Graph::PlatformSpecific.