From d3a22ad4d4e6bc12ca64c1a7f94aef4f4fb791e3 Mon Sep 17 00:00:00 2001 From: Beuc Date: Sun, 20 May 2018 22:18:11 +0200 Subject: [PATCH] Fix 06-cython-packages compilation Previous version produced: PyMODINIT_FUNC PyInit_app\_\_b(void); /*proto*/ causing a compile-time error: gen1/app/b.c:790:26: error: expected ';' after top level declarator --- utils/patch_cython_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/patch_cython_module.py b/utils/patch_cython_module.py index 057d028..704c2b5 100644 --- a/utils/patch_cython_module.py +++ b/utils/patch_cython_module.py @@ -8,7 +8,7 @@ def patch_init_name(src, module_path): new_name = '__'.join(module_path) dst = re.sub( r'(PyMODINIT_FUNC (?:init|PyInit_))' + re.escape(current_name), - '\\1' + re.escape(new_name), + '\\1' + new_name, src, ) return dst