# Generate wrapper code for this module/header code block
fun compile_module_block(block: AExternCodeBlock, ecc: CCompilationUnit, mmodule: MModule) is abstract
src/ffi/light_ffi_base.nit:120,2--121,103
redef fun compile_module_block(block, ecc, mmodule)
do
if block.is_c_header then
ecc.header_custom.add block.location.as_line_pragma
ecc.header_custom.add "\n"
ecc.header_custom.add block.code
else if block.is_c_body then
ecc.body_impl.add block.location.as_line_pragma
ecc.body_impl.add "\n"
ecc.body_impl.add block.code
end
end
src/ffi/light_c.nit:33,2--44,4
redef fun compile_module_block(block, ecc, mmodule)
do
if mmodule.cpp_file == null then mmodule.cpp_file = new CPPCompilationUnit
if block.is_cpp_header then
mmodule.cpp_file.header_custom.add(block.location.as_line_pragma)
mmodule.cpp_file.header_custom.add(block.code)
else if block.is_cpp_body then
mmodule.cpp_file.body_custom.add( block.location.as_line_pragma )
mmodule.cpp_file.body_custom.add( block.code )
end
end
src/ffi/cpp.nit:39,2--50,4
redef fun compile_module_block(block, ccu, mmodule)
do
mmodule.ensure_java_files
var java_file = mmodule.java_file
assert java_file != null
if block.is_inner_java then
java_file.class_content.add(block.code)
else java_file.header.add(block.code)
end
src/ffi/java.nit:35,2--44,4
redef fun compile_module_block(block, ecc, mmodule)
do
if mmodule.objc_file == null then mmodule.objc_file = new ObjCCompilationUnit
if block.is_objc_header then
mmodule.objc_file.header_custom.add block.location.as_line_pragma
mmodule.objc_file.header_custom.add block.code
mmodule.has_public_objc_header = true
else if block.is_objc_body then
mmodule.objc_file.body_custom.add block.location.as_line_pragma
mmodule.objc_file.body_custom.add block.code
end
end
src/ffi/objc.nit:64,2--77,4