def METHOD_NAME(f, var, line):
    f.write('#ifdef FASTR\n')
    f.write('LibExtern SEXP FASTR_{0}();\n'.format(var))
    f.write('LibExtern SEXP {0};\n'.format(var))
    f.write('#ifndef NO_FASTR_REDEFINE\n')
    f.write('#define {0} FASTR_{0}()\n'.format(var))
    f.write('#endif\n')
    f.write('#else\n')
    f.write(line)
    f.write('#endif\n')