- var base_cname = "null_{mtype.mangled_cname}"
- ccu.header_decl.add("#define {base_cname} {v.compiler.mainmodule.name}___{base_cname}\n")
+ ccu.header_decl.add("#define {base_cname} {full_cname}\n")
+
+ # FIXME: This is ugly an broke the separate compilation principle
+ # The real function MUST be compiled only once, #define pragma only protect the compiler, not the loader
+ # However, I am not sure of the right approach here (eg. week refs are ugly)
+ if is_already_compiled then return
+ is_already_compiled = true