Commit 5ab91326 authored by Jason Evans's avatar Jason Evans

Set module name for Spam/__init__.pyx to Spam.

parent 84238b48
......@@ -805,7 +805,12 @@ class ModuleScope(Scope):
self.parent_module = parent_module
outer_scope = context.find_submodule("__builtin__")
Scope.__init__(self, name, outer_scope, parent_module)
self.module_name = name
if name != "__init__":
self.module_name = name
else:
# Treat Spam/__init__.pyx specially, so that when Python loads
# Spam/__init__.so, initSpam() is defined.
self.module_name = parent_module.module_name
self.context = context
self.module_cname = Naming.module_cname
self.module_dict_cname = Naming.moddict_cname
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment