Commit e406de9e authored by Robert Bradshaw's avatar Robert Bradshaw

Merge branch '0.20.x'

Conflicts:
	CHANGES.rst
parents ba625742 82ca1aff
...@@ -64,6 +64,8 @@ Bugs fixed ...@@ -64,6 +64,8 @@ Bugs fixed
* Syntax highlighting in ``cython-mode.el`` for Emacs no longer * Syntax highlighting in ``cython-mode.el`` for Emacs no longer
incorrectly highlights keywords found as part of longer names. incorrectly highlights keywords found as part of longer names.
* Correctly handle `from cython.submodule comport name``.
Other changes Other changes
------------- -------------
......
...@@ -778,10 +778,7 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations): ...@@ -778,10 +778,7 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
# from cython.parallel cimport parallel, prange, ... # from cython.parallel cimport parallel, prange, ...
self.parallel_directives[as_name or name] = qualified_name self.parallel_directives[as_name or name] = qualified_name
elif self.is_cython_directive(full_name): elif self.is_cython_directive(full_name):
if as_name is None: self.directive_names[as_name or name] = full_name
as_name = full_name
self.directive_names[as_name] = full_name
if kind is not None: if kind is not None:
self.context.nonfatal_error(PostParseError(pos, self.context.nonfatal_error(PostParseError(pos,
"Compiler directive imports must be plain imports")) "Compiler directive imports must be plain imports"))
...@@ -1689,7 +1686,7 @@ if VALUE is not None: ...@@ -1689,7 +1686,7 @@ if VALUE is not None:
return None return None
else: else:
return self.visit_ClassDefNode(node) return self.visit_ClassDefNode(node)
def visit_CStructOrUnionDefNode(self, node): def visit_CStructOrUnionDefNode(self, node):
# Create a wrapper node if needed. # Create a wrapper node if needed.
# We want to use the struct type information (so it can't happen # We want to use the struct type information (so it can't happen
......
cimport cython.operator cimport cython.operator
from cython.operator cimport dereference
from cython.operator cimport dereference as deref
def test_deref(int x): def test_deref(int x):
""" """
>>> test_deref(3) >>> test_deref(3)
3 (3, 3, 3)
>>> test_deref(5) >>> test_deref(5)
5 (5, 5, 5)
""" """
cdef int* x_ptr = &x cdef int* x_ptr = &x
return cython.operator.dereference(x_ptr) return cython.operator.dereference(x_ptr), dereference(x_ptr), deref(x_ptr)
def increment_decrement(int x): def increment_decrement(int x):
""" """
......
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