def gen_C_source(ir_arch, func_code): c_source = "" c_source += "\n".join(func_code) c_source = gen_core(ir_arch.arch, ir_arch.attrib) + c_source c_source = "#define PARITY_IMPORT\n#include <Python.h>\n" + c_source return c_source
def gen_C_source(ir_arch, func_code): c_source = "" c_source += "\n".join(func_code) c_source = gen_core(ir_arch.arch, ir_arch.attrib) + c_source c_source = """ #ifdef __x86_64__ #ifndef __LP64__ /* for ubuntu ?!? XXX TODO /!\ force 64 bit system using 64 bits libc change this to __ILP32__ to do so. */ #define __LP64__ #endif #endif """ + "#include <Python.h>\n" + c_source return c_source