Commit 2c748f0e authored by Robert Bradshaw's avatar Robert Bradshaw

Test for ticket #4, from package cimport module, finish fixing ticket.

parent 7176077c
...@@ -4688,8 +4688,12 @@ class FromCImportStatNode(StatNode): ...@@ -4688,8 +4688,12 @@ class FromCImportStatNode(StatNode):
entry = module_scope.declare_c_class(name, pos = pos, entry = module_scope.declare_c_class(name, pos = pos,
module_name = self.module_name) module_name = self.module_name)
else: else:
error(pos, "Name '%s' not declared in module '%s'" submodule_scope = env.context.find_module(name, relative_to = module_scope, pos = self.pos)
% (name, self.module_name)) if submodule_scope.parent_module is module_scope:
env.declare_module(as_name or name, submodule_scope, self.pos)
else:
error(pos, "Name '%s' not declared in module '%s'"
% (name, self.module_name))
if entry: if entry:
local_name = as_name or name local_name = as_name or name
......
cdef int **foo(void*)
from a cimport b
cdef int **t = b.foo(NULL)
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