diff --git a/mypyc/codegen/emitmodule.py b/mypyc/codegen/emitmodule.py index 1ee2ee2aadd8..f914bfd6345d 100644 --- a/mypyc/codegen/emitmodule.py +++ b/mypyc/codegen/emitmodule.py @@ -582,7 +582,7 @@ def generate_c_for_modules(self) -> list[tuple[str, str]]: fn, emitter, self.source_paths[module_name], module_name ) if multi_file: - name = f"__native_{emitter.names.private_name(module_name)}.c" + name = f"__native_{exported_name(module_name)}.c" file_contents.append((name, "".join(emitter.fragments))) # The external header file contains type declarations while