Commit c896e861 authored by Stefan Behnel's avatar Stefan Behnel

Merge remote-tracking branch 'origin/release'

parents 91f2ad9f 3c970eed
...@@ -3461,7 +3461,8 @@ class CppClassType(CType): ...@@ -3461,7 +3461,8 @@ class CppClassType(CType):
}) })
from .UtilityCode import CythonUtilityCode from .UtilityCode import CythonUtilityCode
env.use_utility_code(CythonUtilityCode.load( env.use_utility_code(CythonUtilityCode.load(
cls.replace('unordered_', '') + ".from_py", "CppConvert.pyx", context=context)) cls.replace('unordered_', '') + ".from_py", "CppConvert.pyx",
context=context, compiler_directives=env.directives))
self.from_py_function = cname self.from_py_function = cname
return True return True
...@@ -3505,7 +3506,8 @@ class CppClassType(CType): ...@@ -3505,7 +3506,8 @@ class CppClassType(CType):
}) })
from .UtilityCode import CythonUtilityCode from .UtilityCode import CythonUtilityCode
env.use_utility_code(CythonUtilityCode.load( env.use_utility_code(CythonUtilityCode.load(
cls.replace('unordered_', '') + ".to_py", "CppConvert.pyx", context=context)) cls.replace('unordered_', '') + ".to_py", "CppConvert.pyx",
context=context, compiler_directives=env.directives))
self.to_py_function = cname self.to_py_function = cname
return True return True
......
...@@ -445,6 +445,9 @@ class Scope(object): ...@@ -445,6 +445,9 @@ class Scope(object):
if self.is_cpp_class_scope and type.is_cfunction and old_type.is_cfunction and type != old_type: if self.is_cpp_class_scope and type.is_cfunction and old_type.is_cfunction and type != old_type:
# C++ method overrides are ok # C++ method overrides are ok
pass pass
elif self.is_cpp_class_scope and entries[name].is_inherited:
# Likewise ignore inherited classes.
pass
elif visibility == 'extern': elif visibility == 'extern':
warning(pos, "'%s' redeclared " % name, 0) warning(pos, "'%s' redeclared " % name, 0)
elif visibility != 'ignore': elif visibility != 'ignore':
......
...@@ -223,7 +223,6 @@ class TestDebugTransform(DebuggerTestCase): ...@@ -223,7 +223,6 @@ class TestDebugTransform(DebuggerTestCase):
# the xpath of the standard ElementTree is primitive, don't use # the xpath of the standard ElementTree is primitive, don't use
# anything fancy # anything fancy
L = list(t.find('/Module/Globals')) L = list(t.find('/Module/Globals'))
# assertTrue is retarded, use the normal assert statement
assert L assert L
xml_globals = dict((e.attrib['name'], e.attrib['type']) for e in L) xml_globals = dict((e.attrib['name'], e.attrib['type']) for e in L)
self.assertEqual(len(L), len(xml_globals)) self.assertEqual(len(L), len(xml_globals))
......
...@@ -210,3 +210,11 @@ def test_insert(): ...@@ -210,3 +210,11 @@ def test_insert():
assert v.size() == count assert v.size() == count
for element in v: for element in v:
assert element == value, '%s != %s' % (element, count) assert element == value, '%s != %s' % (element, count)
# Tests GitHub issue #1788.
cdef cppclass MyVector[T](vector):
pass
cdef cppclass Ints(MyVector[int]):
pass
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