提交 e2b8f8a9 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Got rid of gcc warning about having no newline at end of mod.cpp

上级 c9e54e0e
......@@ -724,6 +724,9 @@ def gcc_module_compile_str(module_name, src_code, location=None, include_dirs=[]
rval = None
cppfile.write(src_code)
# Avoid gcc warning "no newline at end of file".
if not src_code.endswith('\n'):
cppfile.write('\n')
cppfile.close()
lib_filename = os.path.join(location, '%s.%s' %
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论