nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nitc/ffi: adds full FFI support for C to nitc
[nit.git]
/
src
/
compiling
/
compiling.nit
diff --git
a/src/compiling/compiling.nit
b/src/compiling/compiling.nit
index
d92473b
..
429505b
100644
(file)
--- a/
src/compiling/compiling.nit
+++ b/
src/compiling/compiling.nit
@@
-115,6
+115,12
@@
redef class MMModule
native_body = native_name + "_nit.c"
if native_body.file_exists then cprogram.files.add(native_body)
end
native_body = native_name + "_nit.c"
if native_body.file_exists then cprogram.files.add(native_body)
end
+ if uses_ffi then
+ var ffi_header_name = "{cname}._ffi.h"
+ v.add_decl("#include \"{ffi_header_name}\"")
+ var ffi_body_name = "{cname}._ffi.c"
+ cprogram.files.add( "{cprogram.compdir}/{ffi_body_name}" )
+ end
end
declare_class_tables_to_c(v)
end
declare_class_tables_to_c(v)